Skip to content

Commit 94ec310

Browse files
docs: more! (#4775)
Add comprehensive authentication, testing, and debugging how-to guides to enhance documentation. --- [Open in Web](https://cursor.com/agents?id=bc-ea21e97d-685a-451f-9700-6955d86ef170) • [Open in Cursor](https://cursor.com/background-agent?bcId=bc-ea21e97d-685a-451f-9700-6955d86ef170) Learn more about [Background Agents](https://docs.cursor.com/background-agent/web-and-mobile) --------- Co-authored-by: Cursor Agent <[email protected]>
1 parent 1cd2868 commit 94ec310

10 files changed

+3562
-5
lines changed

docs/router/framework/react/guide/authenticated-routes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,19 @@ export const Route = createFileRoute('/dashboard')({
166166
You can _optionally_, also use the [Non-Redirected Authentication](#non-redirected-authentication) approach to show a login form instead of calling a **redirect**.
167167

168168
This approach can also be used in conjunction with Pathless or Layout Route to protect all routes under their parent route.
169+
170+
## Related How-To Guides
171+
172+
For detailed, step-by-step implementation guides, see:
173+
174+
- [How to Set Up Basic Authentication](../how-to/setup-authentication.md) - Complete setup with React Context and protected routes
175+
- [How to Integrate Authentication Providers](../how-to/setup-auth-providers.md) - Use Auth0, Clerk, or Supabase
176+
- [How to Set Up Role-Based Access Control](../how-to/setup-rbac.md) - Implement permissions and role-based routing
177+
178+
## Examples
179+
180+
Working authentication examples are available in the repository:
181+
182+
- [Basic Authentication Example](https://github.com/TanStack/router/tree/main/examples/react/authenticated-routes) - Simple authentication with context
183+
- [Firebase Authentication](https://github.com/TanStack/router/tree/main/examples/react/authenticated-routes-firebase) - Firebase Auth integration
184+
- [TanStack Start Auth Examples](https://github.com/TanStack/router/tree/main/examples/react) - Various auth implementations with TanStack Start

docs/router/framework/react/how-to/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ This directory contains focused, step-by-step instructions for common TanStack R
1414
- [Set Up Server-Side Rendering (SSR)](./setup-ssr.md) - Implement SSR with TanStack Router
1515
- [Migrate from React Router v7](./migrate-from-react-router.md) - Complete migration guide from React Router v7
1616

17+
### Authentication
18+
19+
- [Set Up Basic Authentication](./setup-authentication.md) - Implement basic auth with React Context
20+
- [Integrate Authentication Providers](./setup-auth-providers.md) - Use Auth0, Clerk, or Supabase
21+
- [Set Up Role-Based Access Control](./setup-rbac.md) - Add permission-based routing
22+
23+
### Testing & Debugging
24+
25+
- [Set Up Testing](./setup-testing.md) - Comprehensive testing setup with Vitest, React Testing Library, and Playwright
26+
- [Debug Router Issues](./debug-router-issues.md) - Troubleshoot common routing problems and performance issues
27+
1728
### UI Library Integration
1829

1930
- [Integrate with Shadcn/ui](./integrate-shadcn-ui.md) - Set up Shadcn/ui components with animations and styling

0 commit comments

Comments
 (0)