SPA: How to get access token?

I am trying to understand how to retrieve an access token in a React SPA which I can use for authorization and include it in the header when calling my API.

In the documentation it shows that I can call getTokenSilently() to retrieve an access token, but the token I receive is not a JWT.

Can anyone point me in the right direction?


Hi @nmck,

If you are not setting the audience for a custom api (only requesting an access token for auth0’s authentication api) then it will be an opaque token, and that is likely what you are referring to.

Let me know if this helps.


1 Like

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