tmarren
1
I am currently using the auth0-js SDK and attempting to use the webAuth.client.login function. I am not seeing an id_token
in the response.
webAuth.client.login({
username: user.email,
password: user.password,
realm: 'Username-Password-Authentication'
}, (err, response) => { console.log(JSON.stringify(response)) })
The response is:
{"accessToken":"asdf","refreshToken":"asdfa","scope":"profile email offline_access","expiresIn":1814400,"tokenType":"Bearer"}
What could be causing no id_token
in the response?
You did not include the openid
scope so the request is not being considered as a normal OIDC request and as such is not returning an ID token.
tmarren
3
That’s exactly it. I should have clarified I was intializing it like this
let webAuth = new WebAuth({
domain: ‘stg-helloinspire.auth0.com’,
clientID: this.config.auth0.clientId,
scope: ‘open_id profile email offline_access’,
audience: this.config.auth0.audience,
redirectUri: this.config.auth0.callbackURL,
responseType: ‘token id_token’
})
The underscore in open_id
was the problem.