[GH-ISSUE #6736] Magic Links: Save Token in SecondaryStorage when No Database is defined #10606

Closed
opened 2026-04-13 06:51:00 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @thipperz on GitHub (Dec 13, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/6736

Is this suited for github?

  • Yes, this is suited for github

No response

Describe the solution you'd like

I'm currently using Stateless Auth (no database)

Magic Links do not seem to work without a database.

I'd like to be able to define custom Set/Get functions in order to make it work without a database.

Utilizing secondaryStorage for that would also work.

Describe alternatives you've considered

I thought that defining secondaryStorage without a database would work just like that, but it seems to not be the case.

Additional context

No response

Originally created by @thipperz on GitHub (Dec 13, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/6736 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. _No response_ ### Describe the solution you'd like I'm currently using Stateless Auth (no database) Magic Links do not seem to work without a database. I'd like to be able to define custom Set/Get functions in order to make it work without a database. Utilizing secondaryStorage for that would also work. ### Describe alternatives you've considered I thought that defining secondaryStorage without a database would work just like that, but it seems to not be the case. ### Additional context _No response_
GiteaMirror added the enhancementlocked labels 2026-04-13 06:51:01 -05:00
Author
Owner

@bytaesu commented on GitHub (Jan 14, 2026):

Hi @thipperz,

Using only in-memory adapter in stateless mode is not suitable for Magic Links, as the server cannot guarantee token persistence during its valid period.

If you have any further questions, feel free to let me know 🙂

<!-- gh-comment-id:3747282555 --> @bytaesu commented on GitHub (Jan 14, 2026): Hi @thipperz, Using only in-memory adapter in stateless mode is not suitable for Magic Links, as the server cannot guarantee token persistence during its valid period. If you have any further questions, feel free to let me know 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10606