[GH-ISSUE #1297] Passkey auth and session cookie cache error #8682

Closed
opened 2026-04-13 03:50:37 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @Valardir on GitHub (Jan 29, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1297

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Activate the cookie session caching
  2. Try to login / add a passkey

Current vs. Expected behavior

Currently a session freshness error is thrown, I couldn't figure out how to fix it. This error does not occur when the cookie cache is disabled.

I don't know if it's really a bug. If it's intended it should be documented that passkey auth and session caching isn't compatible.

What version of Better Auth are you using?

1.1.14

Provide environment information

- Windows 11
- Chrome

Which area(s) are affected? (Select all that apply)

Client, Backend

Auth config (if applicable)


Additional context

No response

Originally created by @Valardir on GitHub (Jan 29, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1297 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Activate the cookie session caching 2. Try to login / add a passkey ### Current vs. Expected behavior Currently a session freshness error is thrown, I couldn't figure out how to fix it. This error does not occur when the cookie cache is disabled. I don't know if it's really a bug. If it's intended it should be documented that passkey auth and session caching isn't compatible. ### What version of Better Auth are you using? 1.1.14 ### Provide environment information ```bash - Windows 11 - Chrome ``` ### Which area(s) are affected? (Select all that apply) Client, Backend ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-13 03:50:37 -05:00
Author
Owner

@tsteckenborn commented on GitHub (Jan 29, 2025):

Can confirm. Also receiving when trying to register a passkey:

{
  "data": null,
  "error": {
    "message": "Session is not fresh",
    "code": "SESSION_IS_NOT_FRESH",
    "status": 403,
    "statusText": "FORBIDDEN"
  }
}
<!-- gh-comment-id:2622502296 --> @tsteckenborn commented on GitHub (Jan 29, 2025): Can confirm. Also receiving when trying to register a passkey: ``` { "data": null, "error": { "message": "Session is not fresh", "code": "SESSION_IS_NOT_FRESH", "status": 403, "statusText": "FORBIDDEN" } } ```
Author
Owner

@xLukasL commented on GitHub (Feb 1, 2025):

Can confirm.

<!-- gh-comment-id:2628777525 --> @xLukasL commented on GitHub (Feb 1, 2025): Can confirm.
Author
Owner

@codedusting commented on GitHub (Mar 3, 2025):

Can confirm. Also receiving when trying to register a passkey:

{
  "data": null,
  "error": {
    "message": "Session is not fresh",
    "code": "SESSION_IS_NOT_FRESH",
    "status": 403,
    "statusText": "FORBIDDEN"
  }
}

This is still not fixed. Is it?

<!-- gh-comment-id:2695316873 --> @codedusting commented on GitHub (Mar 3, 2025): > Can confirm. Also receiving when trying to register a passkey: > > ``` > { > "data": null, > "error": { > "message": "Session is not fresh", > "code": "SESSION_IS_NOT_FRESH", > "status": 403, > "statusText": "FORBIDDEN" > } > } > ``` This is still not fixed. Is it?
Author
Owner

@mattyx97 commented on GitHub (Mar 10, 2025):

Same problem here, again

<!-- gh-comment-id:2709973816 --> @mattyx97 commented on GitHub (Mar 10, 2025): Same problem here, again
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8682