Skip to content

Tech Spike: Automatically delete expired Jwt and Session tokens #4252

Open

Description

@exaby73

Problem to Solve

Currently, with the new authentication module, users have to manually call .deleteExpired*Tokens

Proposal

We need to discuss about the best way of to automatically delete expired tokens. Current discussions within the team are:

  • We should not use future calls for this purpose as this causes the database to never sleep
  • Trigger and forget a delete on token rotation (this only applies for Jwt). Users would be able to configure a min interval to trigger this to ensure we don't trigger this too often

Use Case

Reduce overhead of users deleting expired tokens manually

Alternatives

N/A

Additional context

No response

How experienced are you with this library?

Expert - Experienced and comfortable with using this library in complex projects

Are you interested in working on a PR for this?

  • I want to work on this

Activity

  1. added
    enhancement
    area: authentication
    on Nov 19, 2025
  2. moved this from Inbox 📫 to Backlog 🗂️ in Serverpod Frameworkson Nov 20, 2025
  3. moved this from Backlog 🗂️ to Planned 🔭 in Serverpod Frameworkson Nov 20, 2025
  4. added
    tech spike
    on Nov 20, 2025
  5. changed the title [-]Spike: Automatically delete expired Jwt and Session tokens[/-] [+]Tech Spike: Automatically delete expired Jwt and Session tokens[/+] on Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: authenticationenhancementtech spike

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions