Inconsistent cookie prefix for passkeys #523

Closed
opened 2026-03-13 07:50:56 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Scooter1337 on GitHub (Jan 4, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Use passkey, use authClient.signIn.passkey() and a new cookie will be created without the configured prefix in advanced: {}

Current vs. Expected behavior

Current:
with:

betterAuth({
  ...
  advanced: {
    cookiePrefix: "TEST",
  },
  ...
)

Expected:

All three cookies to begin with TEST

What version of Better Auth are you using?

1.1.9 (latest)

Provide environment information

-

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

Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  ...
  advanced: {
    cookiePrefix: "TEST",
  },
  ...
});

Additional context

No response

Originally created by @Scooter1337 on GitHub (Jan 4, 2025). ### Is this suited for github? - [X] Yes, this is suited for github ### To Reproduce Use passkey, use `authClient.signIn.passkey()` and a new cookie will be created without the configured prefix in `advanced: {}` ### Current vs. Expected behavior Current: with: ```typescript betterAuth({ ... advanced: { cookiePrefix: "TEST", }, ... ) ``` <img width="1224" src="https://github.com/user-attachments/assets/ee563721-5696-497f-9014-18c94e4fc586" /> Expected: All three cookies to begin with TEST ### What version of Better Auth are you using? 1.1.9 (latest) ### Provide environment information ```bash - ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ ... advanced: { cookiePrefix: "TEST", }, ... }); ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 07:50:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#523