userTokenManager.GetAccessTokenAsync with new scope #279
Replies: 3 comments 3 replies
-
The default behavior is indeed using a cache to return the existing token if there still is a valid one. You can set That said, you won't be able to request an access token using scopes that weren't present in the initial request: the refresh token is bound to the scopes and resources that were initially requested. Put differently: you can only downscope access tokens when requesting a new one (when |
Beta Was this translation helpful? Give feedback.
-
Hi @wcabus, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I've got a short question on userTokenManager.GetAccessTokenAsync
If my initial login request has let's say these scopes: openid, email, offline_access, someScope
what is the expected result if I call
or using
?
Should it throw an exception or would it use the refresh token to get a new access token for the requested scope?
I'm asking because it seems like as long as the initial access token is valid, there is no extra check or request done to fetch a new token which would match that scope.
Beta Was this translation helpful? Give feedback.
All reactions