Add authentication and authorization to an app — login, signup, session management, and protected routes. Supports Auth0, NextAuth, Clerk, Supabase Auth, and custom JWT. Use when the user says "add login", "protect this route", "add auth", or "users need accounts".
npx @senso-ai/shipables install KeyanVakil/add-authWire up auth without breaking anything.
Install packages, configure the provider with env vars. Add env vars to .env.example.
Set up session storage or JWT verification. Follow the provider's recommended pattern exactly.
Create or wire up login/signup pages. Use the provider's hosted UI if available — don't build a custom form unless asked.
Add route protection:
<PrivateRoute> wrapper or router guardsExpose the current user via context/hook so any component can access user.id, user.email, etc.
Wire up a logout button/route that clears the session and redirects.
AUTH0_SECRET, AUTH0_BASE_URL, AUTH0_ISSUER_BASE_URL, AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET@auth0/nextjs-auth0 for Next.js — wrap _app with UserProvider, use withPageAuthRequired for protected pages{BASE_URL}/api/auth/callbackNEXT_PUBLIC_* varsuser_id foreign key to any table that stores user-owned data