Auth0 JWT problem

With Angular project using:
@auth0/auth0-angular

User successfully logs in with loginWithRedirect(). Gets redirected back to page.

localStorage now has information on the current user, however the user‘s JWT token doesn‘t seem to be there. There is a token variable in currentUser, but it‘s not a JWT token.

In the Network tab in dev tools I can verify that a request is sent to oauth/token/ and the JWT token is returned. However I have not found auth0-angular documentation about how to access it, as it doesn‘t seem to be put into local storage.

Hi @sigurjon.magnusson,

Welcome to the Community!

Are you trying to get the access token or ID token?

Hi @dan.woda
Thanks for that.
The ID token. Currrently the access token returned from the oauth/token call is passed on to the backend, receiving an error back stating that the token is not correct (in 1 part, not 3.)

Ps I’m stuck on this issue any help would be great

kind reards
Sigurjon

I’m not quite sure I understand the issue here.

You want the ID token, but are getting errors with the access token? Lets cover one problem at a time.

Start with the access token issue. What is the error exactly? I know there isn’t a not correct error.