Closed jeroenvanhattem closed 2 years ago
offline_access
is added by default. try to replace it with openid
Look an example in the sample app
@vmurin I have tried the sample app, but it's also not giving me a refresh token. Is there a specific function I need to call to receive it?
Ahh, you are right! There was already same question. Look at the issue #67
@vmurin I need the refresh token in order to send it to my server. My server handles Microsoft Graph stuff to allow for multiplatform (mobile and web) use. Are there future plans for a getRefreshToken function? That'd be really great!
You can easily access refresh token like this after login (i.e. authorize(...)
function successfully completed )
console.log('Refresh token:', await azureAuth.auth.cache.getRefreshToken(tokens.userId));
See sample App login example
It works. Amazing. Thank you so much for your very quick responses!
I use this code to authenticate a user. I get an accessToken, rawIdToken and other information returned. I do however not receive a refresh token. The scopes returned by this response do also not include the offline_access scope.
Am I missing something?