Auth0 Home Blog Docs

how to retrieve user's id from mobile side?

auth0
api
userinfo
social-connections
username-password-co

#1

On the mobile side, I need to be able to have the user’s ID field so that I can use that information to query on another database. How can I get this data in the mobile code? Is there an Auth0 API to query this data based on the user’s email (using database method and social login method)?

Thanks!


#2

Have you looked into https://auth0.com/docs/rules and https://auth0.com/docs/hooks both of which solve different problems however can be used as the part of singup/signin flow to fetch more information from a 3rd party database (or in your case fetching it from micro service)


#3

In general the authentication response returned to your mobile application will include an ID token that after validation can be used to obtain that information, more specifically, the sub claim of the ID token will contain the Auth0 user identifier.


#4