-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get a token object from a raw refresh token string #74
Comments
In this context I would like to add: Background: You could do something like this as a workaround to achieve this using the
But this is kind of tricky so it would be great if |
You shouldn't need the |
Yes, but I try to prevent a new request for the second token because it would use the device_code flow (cloned from the first token) and this would lead to user interaction again. So the if condition is to only call get_access_token, when the token is already cached to prevent user interaction for the cloned token. |
I have a raw OAuth 2.0 refresh token string (let's say from a previous session or obtained by other means) and would like to get a Azure Token object (including a new access token and refresh token) without requiring any user interaction.
As I only have the raw refresh token string and no AzureToken object, calling
refresh()
is not possible at that time.And trying to create an AzureToken directly results in following error message:
Do not call this constructor directly; use get_azure_token() instead
However, the get_azure_token() function does not provide an option to pass a refresh token.
Could you provide a way to get an AzureToken object from an OAuth 2.0 refresh token string?
The text was updated successfully, but these errors were encountered: