[][src]Function twitch_oauth2::refresh_token

pub async fn refresh_token<RE, C, F, '_, '_>(
    http_client: C,
    refresh_token: RefreshToken,
    client_id: &'_ ClientId,
    client_secret: &'_ ClientSecret
) -> Result<(AccessToken, Option<Instant>, Option<RefreshToken>), RefreshTokenError<RE>> where
    RE: Error + Send + Sync + 'static,
    C: FnOnce(HttpRequest) -> F,
    F: Future<Output = Result<HttpResponse, RE>>, 

Refresh the token, call if it has expired.

See https://dev.twitch.tv/docs/authentication#refreshing-access-tokens