I am trying to use buildAuthorizeUrl()
to send a user directly to the google login screen. However when I get the response I have accessToken and idToken but refreshToken is set to null
. I’m currently implementing it like so:
let webAuth = new WebAuth({
domain: 'domain',
clientID: this.config.auth0.clientId,
scope: 'openid profile email offline_access',
audience: this.config.auth0.audience,
redirectUri: this.config.auth0.socialCallbackURL,
responseType: 'token id_token'
})
let url = webAuth.client.buildAuthorizeUrl({ nonce: this.config.auth0.nonce, connection:'google-oauth2' })
Then when I get the url back I grab the hash off the end and use parseHash()
webAuth.parseHash({ hash: hash, nonce: this.config.auth0.nonce }, (err, authResult) => {})
The value of authResult returns refreshToken set to null