Skip to content

Refresh token expiration  #226

@alexibz

Description

@alexibz

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions