-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
reuse_access_token config should be used when refreshing a token #1663
Comments
I'd disagree with this, as if you are using refresh tokens with reuse_access_token, you're explicitly saying "please generate a new access token", i.e., I think what you're proposing would render refresh tokens pointless. |
Well, it is definitively not pointless, since you'll need to refresh your access token eventually nonetheless. But I understand that if you explicitly ask to refresh your current token, it could be considered weird/a bug to return the current, unexpired token. If it is a matter of security, the "good" way to invalidate your tokens would be to revoke them however. I don't know. Maybe it should be configurable? |
I'd probably say "reuse_access_token" should maybe be considered incompatible with refresh tokens? Maybe? Token reuse in general is a really bad idea, imo, and not having expiry on tokens that are not PATs is really not a good idea, but even PATs should probably expire & be refreshed regularly. |
@nbulaj I am curious, what is your opinion on this? |
Maybe I am wrong, but I feel like
reuse_access_token
should apply when refreshing a token that has not expired yet.An improper use of the
refesh_token
grant type could lead to the creation of an unnecessary number of access tokens and bloat the underlying database.I believe the only change needed to make this possible would be to replace
create_for
here by thefind_or_create_for
method of the access token mixin.The text was updated successfully, but these errors were encountered: