Does the Okta LoginCallback component save tokens to tokenManager for you?

I’m working on a react app with pkce flow.

The api documentation states that the LoginCallback component processes the okta response for you.
Does this mean it saves the tokens in the tokenManager? What else does it do for you?

Also, how do I know where it will redirect to after LoginCallback? Is that what the OriginalUri is for?

My login is working, I’m just trying to understand the process and where I need to add code to handle the tokens.

Also, I’m using the PKCE flow with custom login.

Right, the LoginCallback component handles the /token call that needs to be done in PKCE flow to get the tokens and will store them in the tokenManager. The tokens in the tokenManager will then be used to determine if the user should still be considered authenticated and or if the tokens need to be refreshed/renewed.

After the user hits the callback component and is sent back to the original uri, do you see tokens in the token manager for them? You can either use a call from the SDK to getTokens or check in localStorage (default storage location) to see if there is a key in there that contains the user’s id and access tokens to confirm.

Yes I do see those tokens both when retrieving via tokenManager.get and in the local storage. We just wanted to be sure we understood what was actually putting them there so we could properly explain the flow to others.

Thanks so much Andrea!

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