Skip to content
Source
Sign inSign up
TanStack/router

examples/react/authenticated-routes

lint
History
Contents of examples/react/authenticated-routes
NameLast commit messageLast commit date
..
.vscode (directory)
src (directory)
.gitignore
index.html
package.json
README.md
tsconfig.json
vite.config.js

README.md

TanStack Router - Authenticated Routes Example

An example demonstrating authentication and protected routes.

Start a new project based on this example

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

npx gitpick TanStack/router/tree/main/examples/react/authenticated-routes authenticated-routes

Getting Started

Install dependencies:

pnpm install

Start the development server:

pnpm dev

Build

Build for production:

pnpm build

About This Example

This example demonstrates:

  • Authentication flow
  • Protected routes
  • Route guards
  • Login/logout functionality
  • Redirect after authentication
  • Public vs private routes