Quick reference guides for FlowStack authentication setup using Better Auth and @daveyplate/better-auth-ui.
| Topic | Description |
|---|---|
| Configuration | ⭐ Centralized config reference (URLs, redirects, env vars) |
| Protected Routes | Protect pages requiring authentication |
| OAuth Redirects | Handle redirects after Google/social login |
| Adding Providers | Add new OAuth providers (GitHub, Discord, etc.) |
| Cross-Domain Auth | Multi-subdomain & cross-domain login |
| Email Templates | Customize verification & reset emails |
| Troubleshooting | Common issues and solutions |
| File | Purpose |
|---|---|
apps/*/src/config/urls.ts |
Frontend/API URLs (APP_URLS) |
apps/*/src/config/redirects.ts |
Frontend redirect paths |
packages/auth/src/config/redirects.ts |
Backend redirect paths |
| File | Purpose |
|---|---|
src/auth.ts |
Main Better Auth configuration |
src/email/*.ts |
Email sending functions |
src/types.ts |
Environment variable types |
| File | Purpose |
|---|---|
src/lib/auth-client.ts |
Auth client configuration |
src/providers.tsx |
AuthUIProvider setup |
src/components/auth/ProtectedRoute.tsx |
Protect routes requiring authentication |
src/pages/auth/*.tsx |
Auth page components |