Skip to content

Tanstack Start Supabase Auth documentation is broken #3831

@mRaffaello

Description

@mRaffaello

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:

  1. 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
  2. When the page loads the getSupabaseServerClient function causes an hydration error

Additionally

  1. 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

  1. Go to the example site page
  2. Open it with code sandbox
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions