# Get User Informations after registration in Auth0

**URL:** <https://community.auth0.com/t/get-user-informations-after-registration-in-auth0/55175>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [December 21, 2020, 8:37am UTC](https://community.auth0.com/t/get-user-informations-after-registration-in-auth0/55175 "2020-12-21T08:37:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin.rouquet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/benjamin.rouquet/32/26422_2.png) [@benjamin.rouquet](https://community.auth0.com/u/benjamin.rouquet)\
**Post date:** [December 21, 2020, 8:37am UTC](https://community.auth0.com/t/get-user-informations-after-registration-in-auth0/55175/1 "2020-12-21T08:37:49Z")

</div>

Hello everyone, I hope you are well!  
I would like to be able to retrieve a user’s information after registration and redirect from Auth0 to save his information on my DB.  
At the moment, after the user’s registration I have a redirection to my application with a “code” and “state” but I can’t find a way to get his UserId in order to retrieve the user’s information myself.

Is there a way to solve to get the user information after his registration with Auth0?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [December 21, 2020, 4:32pm UTC](https://community.auth0.com/t/get-user-informations-after-registration-in-auth0/55175/3 "2020-12-21T16:32:17Z")

</div>

Hi Benjamin,

I hope you are doing well too!

In the [Authorization Code flow](https://auth0.com/docs/flows/authorization-code-flow), you can use the code you receive from Auth0 to get an [ID Token](https://auth0.com/docs/tokens/id-tokens) and an [Access Token](https://auth0.com/docs/tokens/access-tokens).

To get user profile information, you can decode the ID Token you receive using a [token verification library](https://jwt.io/#libraries-io):  
[Example ID Token](https://jwt.io/#debugger-io?token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InNGOTI1TVY3UTd1YldKdkZrdjkycSJ9.eyJuaWNrbmFtZSI6InN0ZXBoIiwibmFtZS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%0AUwOyfU7SMAxzygCx7oDwSb7HlQ%2BTtfNNna5sHu1SFOVtzhNroGYZ9%2FCPNyWyV9UJ%0APfWfNY6JqGkh7%2BFvc2WX2bTbqbbtQIhsNhd1TiFbF1kBZc5gODceGtpLiXx%2BQDNN%0AIVYJ9fBgZRj2Zp48pIEgRG9oCLRqJWHCZumxkrwzqtUZyd2NZ5coRgvrNhwlYWlQ%0Ap9ZPx3ge6ssfy6DGcJmFfQ25R3mBgKnE2CToytNlkwKA463NrwO4uLvLNf44IsdW%0Ap2IT0HlYDmvchQGcglRF1PdWJ1N1QuedmXjPmNQ8gfCliDJpumeGsmuFSapfHSmt%0A0wIDAQAB%0A-----END%20PUBLIC%20KEY-----%0A)

Alternatively, you can use the Access Token to get profile information about the user using the [/userinfo endpoint](https://auth0.com/docs/api/authentication#user-profile).

Here is a guide on how to add auth to your application using authorization code flow: [Add Login Using the Authorization Code Flow](https://auth0.com/docs/flows/add-login-auth-code-flow)

The guide describes how to exchange the code for the ID Token and Access Token.

Let me know if you have any follow up questions!

Stephanie

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [January 4, 2021, 4:32pm UTC](https://community.auth0.com/t/get-user-informations-after-registration-in-auth0/55175/4 "2021-01-04T16:32:17Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
