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

Refresh token expiration #226

Open
alexibz opened this issue Sep 23, 2022 · 0 comments
Open

Refresh token expiration #226

alexibz opened this issue Sep 23, 2022 · 0 comments

Comments

@alexibz
Copy link

alexibz commented Sep 23, 2022

I'm trying to detect when a refresh_token would expire, i.e. the 5 cases outlined here. My understanding is that the expired, expiry_at fields of the Oauth client are all related to the access_token rather than the refresh_token. Is there a way to detect refresh_token expiration using the library?

      auth_client = Signet::OAuth2::Client.new(
        authorization_uri: "...."
        token_credential_uri: "....",
        client_id: "...",
        client_secret: "....",
        redirect_uri: "..."
      )
      auth_client.refresh_token = "refresh_token"
      response = auth_client.fetch_access_token!
      response = auth_client.expired?
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