-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
If my understanding is correct, a successful authentication always create a new access token.
Is there an option to return an existing token, if found for the same (resource_owner_id, application_id) pair?
Some lazy app developers (or bugs) could just ask for a new token every time, rather than correctly store and handle the token with expiration information.
The result is ever growing database records. It's like permanent memory leak, and there's no chance for garbage collection if the expiration is set at a distant future. It's so easy to accidentally attack the system.
I would like to bound the maximum number of records in oauth_access_tokens for predictable server sizing and provisioning, and to do so, guaranteed uniqueness of (resource_owner_id, application_id) sounds reasonable.
Was there any discussion over the matter? And would it be accepted if I create a pull request to add that option?