Auth
FundAdmin AI uses NextAuth v5 with magic link (passwordless) authentication.
Sign-in Flow
- User enters their email at
/signin - A magic link is sent via email (Resend transport in production)
- In development, the link is printed to the console — no email service needed
- User clicks the link, lands on
/verify, and is signed in - On first login, redirected to
/onboarding; thereafter to the workspace home
Configuration
| Environment Variable | Description |
|---|---|
AUTH_SECRET | Auto-generated on cp .env.example .env — do not share |
RESEND_API_KEY | Resend API key for production email delivery |
NEXTAUTH_URL | Canonical URL (defaults to http://localhost:3000 in dev) |
In development with no RESEND_API_KEY, magic links are logged to the console transport — no email setup required.
Session
NextAuth v5 manages sessions via JWT. The session is available server-side via auth() and client-side via useSession().
Auth Routes
| Route | Purpose |
|---|---|
/signin | Sign-in page |
/signup | Sign-up page (also issues magic link) |
/verify | Magic link callback handler |
/api/auth/[...nextauth] | NextAuth route handler |