You've already forked AstralRinth
forked from didirus/AstralRinth
Fix auth (finally) (#937)
* Finish auth * Clippy + fix avatar on alts * add retrying to entitlement request
This commit is contained in:
@@ -64,7 +64,7 @@ pub async fn refresh_credentials(
|
||||
.as_error())
|
||||
}
|
||||
xsts_token::XSTSResponse::Success { token: xsts_token } => {
|
||||
let bearer_token =
|
||||
let (bearer_token, expires_in) =
|
||||
bearer_token::fetch_bearer(&xsts_token, &xbl_token.uhs)
|
||||
.await
|
||||
.map_err(|err| {
|
||||
@@ -76,8 +76,7 @@ pub async fn refresh_credentials(
|
||||
|
||||
credentials.access_token = bearer_token;
|
||||
credentials.refresh_token = oauth.refresh_token;
|
||||
credentials.expires =
|
||||
Utc::now() + Duration::seconds(oauth.expires_in);
|
||||
credentials.expires = Utc::now() + Duration::seconds(expires_in);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user