💻 Tech
If you encounter access token from AuthService’s getAccessTokenSilently
method that couldn’t be parsed with correctly, it may be opaque. Opaque JWT are tokens that are not readable or decodeable unlike regular JWTs. You’ll know that it’s opaque when you’re encountering errors using it with jwt.io. Now, if you want the regular JWT from getAccessTokenSilently
, provide an audience to that method like so:
this.auht0Service.getAccessTokenSilently({
authorizationParams: {
audience: 'https://dev-12345.auth0.com/api/v2/',
},
}),
This helps Auth0 identify that the token is intended for client use, not for Auth0 APIs.