You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If access token is retrieved using a non default audience, the idTokenClaims$ observable emits an event with a null value because it internally appears to be always looking for id token using the default audience:
// This returns a null value when access token is retrieved as shown on the next line
this.authService.idTokenClaims$.pipe((take(1)))
.subscribe((idToken) => {
console.log('id token:', JSON.stringify(idToken));
});
this.authService.getAccessTokenSilently({
audience: 'non default audience',
ignoreCache: true
});
Ideal solution
The AuthService either exposes a way to retrieve the ID token for a given audience or the observable emits id tokens for any audience with some way to identify what audience it is for.
The text was updated successfully, but these errors were encountered:
Thanks for the update. I believe this is not an explicitly supported feature, but a side-effect of exposing the auth0Client, which I believe is a good idea for these kind of situations where you might need behavior of the underlying SDk that doesn't exist in the Angular SDK natively.
Problem
Ideal solution
The text was updated successfully, but these errors were encountered: