When you set PKCE to false and responseType is ['token', 'id_token'], then you are using the implicit flow and the tokens are returned in a fragment.
If id_token or token is specified as the response type, then query isn’t allowed as a response mode. Defaults to fragment in implicit and hybrid flows.
if the data came in the fragment, so is available in angular(frontend) only?
i’m trying to use the widget and give my api route(server) as the redirect url,
in my api , i need to verify the token and pull the user info from the token to grant access to my existing app.
is there any other way to do it?
how can i verify & get user info from server using the “code” that came from okta login ?
If you’re using showSignInAndRedirect then I think you need to parse the authorization code from the url and exchange it for tokens via the /token request. You can also check out the Okta Auth JS library:
You can also check out the Okta Angular sample app as well. This one uses the widget: