I’ve attempted to get the user’s username by accessing the user management api.
My webAuth init looks like:
this.webAuth = new auth0.WebAuth({
audience: 'https://' + config.auth0.domain + '/userinfo',
clientID: config.auth0.clientId,
domain: config.auth0.domain,
redirectUri: config.auth0.redirectUri,
responseType: 'token id_token',
scope: 'openid profile email'
});
My management initialization looks like:
this.mgmt = new auth0.Management({
domain: config.auth0.domain,
token: accessToken
})
The “accessToken” being used is the idToken value pulled from the user. I’ve searched around and am seeing conflicted thoughts on using the idToken, and that the accessToken (an opaque string) is not the access token.
idToken looks like expected JWT format. So I’m not sure what I’m missing.