MoveFast uses NextAuth.js (Auth.js) for authentication with two providers: Google OAuth and Magic Link.
Google OAuth
1. Create OAuth Credentials
- Go to Google Cloud Console
- Create a new project or select an existing one
- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select Web application
2. Configure Authorized Origins & Redirects
In the OAuth client settings, add the following:
Authorised JavaScript origins:
code
http://localhost:3000
https://yourdomain.comAuthorised redirect URIs:
code
http://localhost:3000/api/auth/callback/google
https://yourdomain.com/api/auth/callback/google3. Add Environment Variables
Copy your Client ID and Client Secret to .env.local:
env
GOOGLE_CLIENT_ID="your-client-id"
GOOGLE_CLIENT_SECRET="your-client-secret"Magic Link
Magic Link lets users sign in with just their email — no password required. A secure link is sent to their inbox.
To configure Magic Link, you need to set up an email provider. See the Email Setup guide for configuration.
Environment Variables
Add these auth-related environment variables to your .env.local:
env
AUTH_SECRET="KNYeQM56xQwZSoZWHlIelyX/Rypgo="
AUTH_TRUST_HOST=true
NEXT_PUBLIC_WEBSITE_URL=http://localhost:3000| Variable | Description |
|---|---|
AUTH_SECRET | Secret key for encrypting sessions. Generate your own for production. |
AUTH_TRUST_HOST | Set to true to trust the host header. Required for most deployments. |
NEXT_PUBLIC_WEBSITE_URL | Your app's URL. Update this for production. |
Tip: Generate a new
AUTH_SECRETfor production by runningopenssl rand -base64 32in your terminal.

