[GH-ISSUE #3682] [Passkey plugin] implement signIn callbackUrl #9684

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

Originally created by @joshuanianji on GitHub (Jul 28, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3682

Is this suited for github?

  • Yes, this is suited for github

#1587 talked about how the passkey's signIn was missing the callbackUrl option, but was closed in #3014 by removing the callbackUrl from the docs.

Is there any plan on implementing the callbackUrl for passkey signIn?

Describe the solution you'd like

authClient.signIn.passkey has a parameter for callbackUrl

Describe alternatives you've considered

I've tried using router refreshes as recommended by the comments in #1587 (e.g. https://github.com/better-auth/better-auth/issues/1587#issuecomment-2764635282), but some components are still not refreshing properly.

Additional context

No response

Originally created by @joshuanianji on GitHub (Jul 28, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3682 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. #1587 talked about how the passkey's signIn was missing the callbackUrl option, but was closed in #3014 by removing the callbackUrl from the docs. Is there any plan on implementing the callbackUrl for passkey signIn? ### Describe the solution you'd like `authClient.signIn.passkey` has a parameter for `callbackUrl` ### Describe alternatives you've considered I've tried using router refreshes as recommended by the comments in #1587 (e.g. https://github.com/better-auth/better-auth/issues/1587#issuecomment-2764635282), but some components are still not refreshing properly. ### Additional context _No response_
GiteaMirror added the enhancementlocked labels 2026-04-13 05:18:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 28, 2025):

Hi @joshuanianji! I'm Dosu and I’m helping the better-auth team.

There is currently no support for a callbackUrl parameter in authClient.signIn.passkey, and there are no signs of plans to add it. The documentation still mentions callbackUrl, but this is outdated—the actual codebase does not accept or process it anywhere in the passkey sign-in flow. After a successful passkey sign-in, you only get session/user data in the response, so you need to handle navigation or redirection manually in your app (for example, by using your router to redirect after a successful sign-in) [source].

If you want to redirect after passkey sign-in, check the response and then programmatically navigate, like:

const res = await authClient.signIn.passkey({ email });
if (res.data?.session) {
  router.push('/your-redirect-url');
}

There’s no evidence of any ongoing or planned work to add callbackUrl support for passkey sign-in as of the latest updates [source].

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:3130119815 --> @dosubot[bot] commented on GitHub (Jul 28, 2025): <!-- Greeting --> Hi @joshuanianji! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> There is currently no support for a callbackUrl parameter in authClient.signIn.passkey, and there are no signs of plans to add it. The documentation still mentions callbackUrl, but this is outdated—the actual codebase does not accept or process it anywhere in the passkey sign-in flow. After a successful passkey sign-in, you only get session/user data in the response, so you need to handle navigation or redirection manually in your app (for example, by using your router to redirect after a successful sign-in) [[source]](https://github.com/better-auth/better-auth/blob/ecb4408c41fb05a1f988a113882b1806267e6af5/packages/better-auth/src/plugins/passkey/client.ts). If you want to redirect after passkey sign-in, check the response and then programmatically navigate, like: ```js const res = await authClient.signIn.passkey({ email }); if (res.data?.session) { router.push('/your-redirect-url'); } ``` There’s no evidence of any ongoing or planned work to add callbackUrl support for passkey sign-in as of the latest updates [[source]](https://github.com/better-auth/better-auth/pull/1193). <!-- 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/971ec64a-4649-4496-b4c9-7c75f496cb50?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/971ec64a-4649-4496-b4c9-7c75f496cb50?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/971ec64a-4649-4496-b4c9-7c75f496cb50?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/971ec64a-4649-4496-b4c9-7c75f496cb50?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/971ec64a-4649-4496-b4c9-7c75f496cb50?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/971ec64a-4649-4496-b4c9-7c75f496cb50?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/971ec64a-4649-4496-b4c9-7c75f496cb50?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/3682)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9684