Function twitch_oauth2::refresh_token[][src]

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