[GH-ISSUE #4500] callbackUrl is missing for passkeys #27283

Closed
opened 2026-04-17 18:13:10 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @proof-llc on GitHub (Sep 7, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/4500

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

try to do this:

authClient.signIn
              .passkey({
                autoFill: true,
                callbackURL: '/',
              })

it says: 'callbackURL' does not exist in type ...

Current vs. Expected behavior

According to https://www.better-auth.com/docs/plugins/passkey#api-method-sign-in-passkey it should be available. Looks like a bug.

What version of Better Auth are you using?

1.3.8

System info

{
  "system": {
    "platform": "darwin",
    "arch": "arm64",
    "version": "Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025;",
    "release": "24.6.0",
    "cpuCount": 16,
    "cpuModel": "redacted",
    "totalMemory": "128.00 GB",
    "freeMemory": "20.62 GB"
  },
  "node": {
    "version": "v24.7.0",
    "env": "development"
  },
  "packageManager": {
    "name": "npm",
    "version": "11.5.1"
  },
  "frameworks": null,
  "databases": null,
  "betterAuth": {
    "version": "0.1.0",
    "config": null
  }
}

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

Client, Types, Documentation

Auth config (if applicable)

export const authClient = createAuthClient({
  plugins: [passkeyClient()],
})

Additional context

No response

Originally created by @proof-llc on GitHub (Sep 7, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/4500 ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce try to do this: ``` authClient.signIn .passkey({ autoFill: true, callbackURL: '/', }) ``` it says: 'callbackURL' does not exist in type ... ### Current vs. Expected behavior According to https://www.better-auth.com/docs/plugins/passkey#api-method-sign-in-passkey it should be available. Looks like a bug. ### What version of Better Auth are you using? 1.3.8 ### System info ```bash { "system": { "platform": "darwin", "arch": "arm64", "version": "Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025;", "release": "24.6.0", "cpuCount": 16, "cpuModel": "redacted", "totalMemory": "128.00 GB", "freeMemory": "20.62 GB" }, "node": { "version": "v24.7.0", "env": "development" }, "packageManager": { "name": "npm", "version": "11.5.1" }, "frameworks": null, "databases": null, "betterAuth": { "version": "0.1.0", "config": null } } ``` ### Which area(s) are affected? (Select all that apply) Client, Types, Documentation ### Auth config (if applicable) ```typescript export const authClient = createAuthClient({ plugins: [passkeyClient()], }) ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-17 18:13:10 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 7, 2025):

This is a confirmed bug: the callbackURL option is missing from the passkey sign-in method's types and implementation in Better Auth v1.3.8, even though the documentation claims it should be available. That's why you're seeing the TypeScript error—callbackURL isn't recognized by the method or its types source.

For now, you’ll need to handle redirects manually after a successful passkey sign-in. You can do this by checking the result and using your router or window.location to navigate:

const result = await authClient.signIn.passkey({ autoFill: true });
if (result?.data?.session) {
  // Redirect manually
  window.location.href = '/';
}

Other sign-in methods (like email or social) support callbackURL because it's explicitly defined in their types and passed to the backend, but this pattern is missing for passkey sign-in source.

There’s no official workaround or config for passkey redirects in this version. If you need more advanced redirect logic, consider using a handler page after sign-in, but you’ll have to trigger it manually until callbackURL is supported in the API.

Let me know if you need help with manual redirect patterns or want to track updates on this bug!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

<!-- gh-comment-id:3263926307 --> @dosubot[bot] commented on GitHub (Sep 7, 2025): <!-- Answer --> This is a confirmed bug: the `callbackURL` option is missing from the passkey sign-in method's types and implementation in Better Auth v1.3.8, even though the documentation claims it should be available. That's why you're seeing the TypeScript error—`callbackURL` isn't recognized by the method or its types [source](https://github.com/better-auth/better-auth/blob/a39d09d3ff83b526fb9caf691d3bbcb3b7b2335b/packages/better-auth/src/plugins/passkey/client.ts). For now, you’ll need to handle redirects manually after a successful passkey sign-in. You can do this by checking the result and using your router or `window.location` to navigate: ```typescript const result = await authClient.signIn.passkey({ autoFill: true }); if (result?.data?.session) { // Redirect manually window.location.href = '/'; } ``` Other sign-in methods (like email or social) support `callbackURL` because it's explicitly defined in their types and passed to the backend, but this pattern is missing for passkey sign-in [source](https://github.com/better-auth/better-auth/blob/a39d09d3ff83b526fb9caf691d3bbcb3b7b2335b/packages/better-auth/src/client/path-to-object.ts). There’s no official workaround or config for passkey redirects in this version. If you need more advanced redirect logic, consider using a handler page after sign-in, but you’ll have to trigger it manually until `callbackURL` is supported in the API. Let me know if you need help with manual redirect patterns or want to track updates on this bug! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/d8107e76-7107-4895-8b6d-254255c2ee4b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d8107e76-7107-4895-8b6d-254255c2ee4b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d8107e76-7107-4895-8b6d-254255c2ee4b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d8107e76-7107-4895-8b6d-254255c2ee4b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d8107e76-7107-4895-8b6d-254255c2ee4b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d8107e76-7107-4895-8b6d-254255c2ee4b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d8107e76-7107-4895-8b6d-254255c2ee4b?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/4500)
Author
Owner

@Kinfe123 commented on GitHub (Sep 8, 2025):

closing via #4515

<!-- gh-comment-id:3267680094 --> @Kinfe123 commented on GitHub (Sep 8, 2025): closing via #4515
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#27283