Skip to main content

refresh

Function refresh 

Source
pub async fn refresh(
    client: &Client,
    base_url: &str,
    client_id: &str,
    current: &TokenSet,
    scope: &str,
    email: &str,
) -> Result<TokenSet, ClientError>
Expand description

Refresh the access token using the stored refresh token.

Returns the new TokenSet. If Microsoft rotates the refresh token, it’s included in the response and used. If not, the current refresh token is preserved.

Errors:

  • ClientError::SessionExpired if Microsoft returns invalid_grant
  • ClientError::Graph for other HTTP errors