Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an easy way to retrieve a token given only the refresh token is valid #158

Open
Emilgardis opened this issue Feb 16, 2025 · 0 comments

Comments

@Emilgardis
Copy link
Member

Emilgardis commented Feb 16, 2025

should be easier than

match refresh_token
    .refresh_token(client, &client_id, client_secret.as_ref())
    .await
{
    Ok((a, _, r)) => UserToken::from_existing(client, a, r, client_secret)
        .await?,
    Err(e) => {
        panic!()
    }
}

perhaps a way to do UserToken::from_existing_or_refresh, or we could do that implicitly (I dislike that idea though)

@Emilgardis Emilgardis changed the title Add an easy way to retrieve a token given only a refresh token and client id Add an easy way to retrieve a token given only the refresh token is valid Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant