Hey everyone, I am trying to upgrade an existing vue.js
with typescript
project from the 1.1.1 version of the auth0-spa-js
library to 1.7.0, however this seems to break the functionality around getting the ID token claims, which we do post-login. I can also confirm the flow works as expected on 1.6.0. Calling auth0.getIdTokenClaims()
returns an undefined object, while the Auth0Client
instance cache only contains the lambda functions it defines. I am using the in-memory cache, although changing it locally to “local storage” does not have any impact on the end result.
Am I missing something here?
I set the domain, client_id, audience, redirect_uri and scope options in the Auth0Client
creation. The login looks as such:
public async login(): Promise<void> {
//defining the options parameter
return this.auth0.loginWithRedirect(options);
}
On redirect this is what gets called:
public async handleAuthentication(): Promise<AuthData> {
let result: RedirectLoginResult;
try {
result = await this.auth0.handleRedirectCallback();
} catch (err) {
//...
}
//this is what returns undefined
const claims = await this.auth0.getIdTokenClaims();
//...
}