Successful auth token, but no refresh token... #380
kitplummer
started this conversation in
General
Replies: 1 comment 10 replies
-
You have to request it with the corresponding method. let token_url = format!(
"https://login.microsoftonline.com/{}/oauth2/v2.0/token",
tenant_id
);
let mut oauth = OAuth::new();
oauth
.client_id(client_id)
.client_secret(client_secret)
.add_scope("https://graph.microsoft.com/.default")
.access_token_url(&token_url)
.refresh_token_url(&token_url)
.response_type("code");
let mut request = oauth.build_async().client_credentials();
let access_token = request.access_token().send().await?;
let refresh_token = request.refresh_token().send().await?; |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Am using the authorization_code flow and am successfully receiving the code and access_token, but am not seeing how to or where the refresh_token is set. In the the local file store - it is set to null. Any pointer to how to get and use the refresh_token to update the access_token?
Looking at the doc, it should be available with the authorization code request (I think): https://learn.microsoft.com/en-us/graph/auth-v2-user
Beta Was this translation helpful? Give feedback.
All reactions