[GH-ISSUE #5240] In Tanstack Start RC createStartHandler function signature was changed, breaking the instructions in the docs #10191

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

Originally created by @rasibn on GitHub (Oct 11, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/5240

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Use Start RC - v1.132 and follow the instructions for either solid or react mentioned here

Current vs. Expected behavior

The signature of createStartHandler was changed in the Tanstack Start RC release.

Previously it was

export function createStartHandler<TRouter extends AnyRouter>({
  createRouter,
}: {
  createRouter: () => Awaitable<TRouter>
}): CustomizeStartHandler<TRouter>

Now it is

export function createStartHandler<TRegister = Register>(
  cb: HandlerCallback<AnyRouter>,
): RequestHandler<TRegister>

This means the instructions here needs to be updated: fb45e2e8e6/docs/content/docs/integrations/tanstack.mdx (L42)

What version of Better Auth are you using?

1.3.26

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

Documentation

Additional context

https://www.better-auth.com/docs/integrations/tanstack

Originally created by @rasibn on GitHub (Oct 11, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/5240 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce Use Start RC - v1.132 and follow the instructions for either solid or react mentioned [here](https://github.com/better-auth/better-auth/blob/fb45e2e8e66d6d617876b59f9860a0e550fb43c4/docs/content/docs/integrations/tanstack.mdx#L4) ### Current vs. Expected behavior The signature of createStartHandler was changed in the Tanstack Start RC release. Previously it was ```js export function createStartHandler<TRouter extends AnyRouter>({ createRouter, }: { createRouter: () => Awaitable<TRouter> }): CustomizeStartHandler<TRouter> ``` Now it is ```js export function createStartHandler<TRegister = Register>( cb: HandlerCallback<AnyRouter>, ): RequestHandler<TRegister> ``` This means the instructions here needs to be updated: https://github.com/better-auth/better-auth/blob/fb45e2e8e66d6d617876b59f9860a0e550fb43c4/docs/content/docs/integrations/tanstack.mdx?plain=1#L42 ### What version of Better Auth are you using? 1.3.26 ### Which area(s) are affected? (Select all that apply) Documentation ### Additional context https://www.better-auth.com/docs/integrations/tanstack
GiteaMirror added the locked label 2026-04-13 06:10:14 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 11, 2025):

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

You are correct—the Tanstack Start RC's createStartHandler signature changed in v1.132, but the Better Auth documentation still shows the old usage and is now outdated. The docs currently reference the previous API (accepting an object with createRouter), which will not work with the new HandlerCallback-based signature in Tanstack Start RC v1.132 and later. There are no migration notes or workarounds documented for Better Auth v1.3.26 with the new Tanstack Start RC signature, so the integration guide needs to be updated to reflect the new API and usage pattern for createStartHandler. Until then, users will need to adapt the integration themselves based on the new Tanstack Start RC API changes.
Reference

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:3393726728 --> @dosubot[bot] commented on GitHub (Oct 11, 2025): <!-- Greeting --> Hi @rasibn! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> You are correct—the Tanstack Start RC's createStartHandler signature changed in v1.132, but the Better Auth documentation still shows the old usage and is now outdated. The docs currently reference the previous API (accepting an object with createRouter), which will not work with the new HandlerCallback-based signature in Tanstack Start RC v1.132 and later. There are no migration notes or workarounds documented for Better Auth v1.3.26 with the new Tanstack Start RC signature, so the integration guide needs to be updated to reflect the new API and usage pattern for createStartHandler. Until then, users will need to adapt the integration themselves based on the new Tanstack Start RC API changes. [Reference](https://github.com/better-auth/better-auth/blob/6682b0838f803bfd0b357b09bdc9ad53d3174b61/docs/content/docs/integrations/tanstack.mdx) <!-- 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/95dc3dd1-6978-4936-803f-34717330acd1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/95dc3dd1-6978-4936-803f-34717330acd1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/95dc3dd1-6978-4936-803f-34717330acd1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/95dc3dd1-6978-4936-803f-34717330acd1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/95dc3dd1-6978-4936-803f-34717330acd1?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/95dc3dd1-6978-4936-803f-34717330acd1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/95dc3dd1-6978-4936-803f-34717330acd1?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/5240)
Author
Owner

@rasibn commented on GitHub (Nov 4, 2025):

fixed in 4786ec35cd

<!-- gh-comment-id:3487618019 --> @rasibn commented on GitHub (Nov 4, 2025): fixed in https://github.com/better-auth/better-auth/commit/4786ec35cda98d057996b3942aa0c71a87b88916
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10191