Auth0 Sample react

Hi there,
am evaluating the react sample , during the login process, there have been two calls made one is authorize where i received the code, and second was token call where I received access_token rather jwt thats fine. The question I had was since react app received access_token how does the app show on the profile page the name and email_id? Because access_token is an opaque one and was wondering was there any call made again which i dont see in the inspect beside the authorize and token call to retrive the user profile inof that is name and emailID. Pls clarify how does the app got the user details displayed on the front end.

thanks

Hello @ysharat welcome to the community!

By default, the SDK uses the scopes openid profile email so an ID token is returned. The auth0-react SDK decodes the ID token and stores its data in the user object exposed via the useAuth0() React hook.

Hope this helps to clarify!

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