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

Extend JWT expiry #50

Open
skittlz444 opened this issue Sep 15, 2020 · 2 comments
Open

Extend JWT expiry #50

skittlz444 opened this issue Sep 15, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@skittlz444
Copy link
Collaborator

Perhaps if the user selects a "remember me" option on login then their token lasts an absurdly long time (6 months?). Extend the base token expiry to 28 days or so.

@skittlz444 skittlz444 added this to the Authentication update milestone Sep 15, 2020
@skittlz444 skittlz444 added the enhancement New feature or request label Sep 15, 2020
@Breadkenty
Copy link
Owner

Breadkenty commented Sep 16, 2020

@skittlz444 There's a problem with that approach and you can read more about it on this article: https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/

As far as I know, having a long expiry for a token is not secure as it allows users to maliciously access user data. Refresh tokens exist so that in case someone does get a hold of an account, it'll only be for a few seconds. I think it's more common to see tokens having expiration times of 30 seconds to a minute, generating refresh tokens every time. I'm not sure what the logistics of how to make this work, but hopefully that article can provide some insight on how to approach this problem. If anything it might be worth doing this while we figure out a solution for JWT refresh tokens.

@skittlz444
Copy link
Collaborator Author

Sorry I didn't say if I was talking about access or refresh, I haven't investigated our auth as heavily or used JWT for a while. I meant having a refresh token that lasts that long, and 30 seconds is shorter than usual I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants