What problem does it solve? Adding authentication to a TanStack Start app normally requires wiring OAuth providers, session handling, protected routes, and per-user data scoping from scratch. This Skill activates a pre-wired Better Auth setup that federates Google and X sign-in through the Grok broker, with optional local email/password accounts. ## Core Features & Use Cases - Broker-federated sign-in: Google and X OAuth through the Grok auth broker, plus optional email/password accounts persisted in the app's own database. - Pre-wired auth library: src/lib/auth/ ships with client helpers, React hooks, gate components (SignedIn, SignedOut, UserButton), and authMiddleware for scoping server functions to context.userId. - Zero-click gate identity: Deployed apps behind the Grok edge gate sign viewers in automatically from the x-grok-identity JWT, with popup-based sign-in as the live-preview fallback. - Use Case: A user asks to add login so each visitor sees only their own saved songs. The Skill flips VITE_AUTH_ENABLED, copies the auth migration, mounts the /api/auth/$ catch-all route and a login page, and wraps server functions in authMiddleware. ## Quick Start Add sign-in with Google and X to this app and protect the saved-songs server functions so each user only sees their own data.