router-core/auth-and-guards

Official

Guard routes with beforeLoad and RBAC

AuthorTanStack
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Protects routes by enforcing authentication and authorization at the routing layer using beforeLoad, redirects, and RBAC, ensuring secure access to protected content.

Core Features & Use Cases

  • BeforeLoad-based route protection that prevents rendering of protected routes until authentication succeeds.
  • RBAC with roles and permissions to control access at page and nested-route levels.
  • Router context integration to share auth state across the app and implement redirect-based flows with providers (Auth0, Clerk, Supabase).

Quick Start

Create a pathless authentication boundary with a beforeLoad guard to redirect unauthenticated users to /login and protect all child routes.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: router-core/auth-and-guards
Download link: https://github.com/TanStack/router/archive/main.zip#router-core-auth-and-guards

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.