Tanstack Start Supabase Auth documentation is broken
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Which project does this relate to?
Router
Describe the bug
Which project does this relate to?
Start
Describe the bug
This Supabase Auth + Tanstack start is currently half broken.
There seems to be two major problems:
- In the fetchUser (__root.tsx) server function, it is returned directly data.user that cointains non-serializable values. Here it's sufficient to no return the entire object
- When the page loads the getSupabaseServerClient function causes an hydration error
Additionally
- In __root.tsx getSupabaseServerClient does not need to be awaited
Your Example Website or App
https://tanstack.com/start/latest/docs/framework/react/examples/start-supabase-basic
Steps to Reproduce the Bug or Issue
- Go to the example site page
- Open it with code sandbox
- Open the console and reload the page
Expected behavior
There should not be any errors with tsc when cloning the template and there should not be an hydration error when the page loads
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the start-supabase-basic example linked in the issue and inspect __root.tsx, especially fetchUser and getSupabaseServerClient. Clone the template, run tsc, then reload the example while watching the console. Done means the type-check passes and the page loads without hydration or serialization errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, supabase, typescript
- Domain
- authentication, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100