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

Indefinite Refresh Tokens #946

Open
Sephster opened this issue Sep 20, 2018 · 6 comments
Open

Indefinite Refresh Tokens #946

Sephster opened this issue Sep 20, 2018 · 6 comments

Comments

@Sephster
Copy link
Member

In its current state I believe the library enforces the use of expiry times for Refresh Tokens. This is good practice but mandatory expiry times are not specified in the OAuth2 spec.

We should evaluate this current stance and see if we want to support indefinite refresh tokens in a future release. Please see issue #944 for the original discussion that led to the raising of this issue.

@mtangoo
Copy link

mtangoo commented Sep 20, 2018

I have seen many application use 0 as indefinite time. I would like to table this too for this specific use case. Set time t for specific expiry or 0 for non expiring

@sg3s
Copy link

sg3s commented Sep 25, 2018

Not in favor, setting a far future expires date is effectively just as good and makes you think about what you're actually doing.

What would be good is somehow being able to set an expiration time for refresh tokens (or access tokens really) per client. So you can control / write logic to determine which clients are actually allowed to receive long lifetime tokens and which are not, instead of always using the defaults configured on the server/grant.

@Sephster Sephster added this to the 8.00 milestone Dec 6, 2018
@christiaangoossens
Copy link
Contributor

christiaangoossens commented May 22, 2019

Within the scope of this project: providing a out-of-the-box safe oauth2 library, I would strongly oppose allowing indefinite refresh tokens by default. If this is a feature that is really wanted, I would only consider it by setting an explicit flag (which is also not used in any examples, only stated in documentation). This way nobody will use indefinite refresh tokens without considering the implications (especially as you can also choose to not implement checking the jti claim).

@mtangoo
Copy link

mtangoo commented May 23, 2023

@LuckyBaBa2022 what about setting expiry date of 100years ahead? ;)

@Starfox64
Copy link

@Sephster #1347 was closed in favor of this issue but I don't think this is related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@Sephster @mtangoo @sg3s @Starfox64 @christiaangoossens and others