What problem does it solve? Securing routes in a TanStack Router application requires coordinating beforeLoad guards, redirect handling, and auth state injection without leaking protected data or breaking navigation flows. ## Core Features & Use Cases - Redirect-Based Route Guards: Protect routes with beforeLoad and redirect() inside _authenticated pathless layout routes, with redirect-back via sanitized search params. - RBAC and Permissions: Enforce role-based and permission-based access with hasRole, hasAnyRole, and hasPermission checks in nested layout routes. - Auth Context Injection: Flow live auth state into the router via createRootRouteWithContext and RouterProvider's context prop without recreating the router. - Use Case: Build an admin dashboard where only users with the admin role can access /_authenticated/_admin routes, unauthenticated visitors are redirected to /login, and after login they return to their original destination. ## Quick Start Protect my TanStack Router dashboard routes so unauthenticated users are redirected to a login page and returned to their original URL after signing in.