Choose an auth provider and ship login, sessions, protected pages, and OAuth without reinventing the wheel.
At a glance
- Login + signup UX
- OAuth support (e.g. Google)
- Protected routes and sessions
- Auth provider keys
- Redirect URLs
- Session secret
Quickstart
Add your auth secrets and OAuth keys to .env.local (BETTER_AUTH_SECRET, GOOGLE_CLIENT_ID, etc.).
Set allowed callback URLs in your provider dashboard (Google, GitHub, etc.).
Restart npm run dev so environment variables are loaded.
Visit /sign-up, create an account, then access a protected page to verify everything works.
Providers
Pick an option below. Each provider has a short guide so you can implement without digging through docs.
Better AuthAvailableExpand
Default in the current scaffold. Database-backed sessions and provider linking.
Supabase AuthComing soonExpand
Magic links + OAuth via Supabase Auth, with a managed user system.
NextAuthComing soonExpand
Popular Next.js auth option with providers and adapter-based persistence.
Code
Copy/paste-friendly code blocks. Designed to get you working quickly without digging through long docs.
Generate a new project and start the dev server.
$ npx saas-scaffold init my-app$ cd my-app$ npm run devMinimal keys you’ll set for Better Auth + Google OAuth.
# AuthBETTER_AUTH_SECRET="please-change-me"GOOGLE_CLIENT_ID="your-google-client-id"GOOGLE_CLIENT_SECRET="your-google-client-secret"