Skip to content

Feat: add support to refresh token absolute lifetime #2

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

Merged
merged 2 commits into from
May 30, 2024

Conversation

kleysonfiretail
Copy link
Collaborator

What does this pull request change?

This pull request adds a new configuration option, refreshTokenExpiryStrategy. This option allows users to specify the refresh token expiration strategy, choosing between:

'renewable': The refresh token's expiration time is renewed each time it is used.
'absolute': The refresh token's expiration time is fixed from its initial issuance and does not change.

Why is this pull request needed?

We are currently using Auth0 with Absolute Expiration. Auth0 implements an absolute expiration strategy for refresh tokens, meaning the expiration time is fixed from the initial issuance and does not renew with each use. However, the library was designed with the assumption that the refresh token expiration would be renewed each time a new refresh token is requested.

This mismatch between the actual expiration behavior and the library's expectations is causing issues. The library incorrectly assumes the refresh token has a longer validity period than it actually does, leading to potential authentication failures when the refresh token expires earlier than anticipated.

By introducing the refreshTokenExpiryStrategy configuration option, we can ensure that the library can accurately handle both renewable and absolute expiration strategies, preventing such mismatches and improving compatibility with different OAuth2 providers like Auth0.

Content related to this change

Configure Refresh Token Expiration - Absolute Lifetime

image

@kleysonfiretail kleysonfiretail merged commit eec3f62 into main May 30, 2024
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

Successfully merging this pull request may close these issues.

2 participants