Back to Router

TanStack Start - Basic Auth Example

examples/react/start-basic-auth/README.md

1.166.7756 B
Original Source

TanStack Start - Basic Auth Example

A TanStack Start example demonstrating authentication patterns and protected routes.

Start a new project based on this example

To start a new project based on this example, run:

sh
npx gitpick TanStack/router/tree/main/examples/react/start-basic-auth start-basic-auth

Getting Started

From your terminal:

sh
pnpm install
pnpm dev

This starts your app in development mode, rebuilding assets on file changes.

Build

To build the app for production:

sh
pnpm build

Authentication Features

This example demonstrates:

  • User authentication flow
  • Protected routes
  • Login/logout functionality
  • Redirect after authentication