Skip to content

Multiple tokens for the same (resource_owner_id, application_id) pair? #383

@kenn

Description

@kenn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions