Sign-in (Google & GitHub)
Dashboard login uses Supabase Auth. OAuth runs on Supabase first, then redirects back to this app at /auth/callback.
1. URL configuration (Supabase)
Supabase Dashboard → Authentication → URL Configuration:
- Site URL — same as
NEXT_PUBLIC_APP_URL(e.g.http://localhost:3001) - Redirect URLs — add:
http://localhost:3001/auth/callback https://your-production-domain.com/auth/callback
Open the app at the same host and port as NEXT_PUBLIC_APP_URL. Do not mix localhost and 127.0.0.1.
2. GitHub OAuth App (not GitHub App)
GitHub → Settings → Developer settings → OAuth Apps → New OAuth App:
- Authorization callback URL (exactly):
https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback
ReplaceYOUR_PROJECT_REFwith your project ref from the Supabase URL.
Supabase → Authentication → Providers → GitHub: enable, paste Client ID and Client Secret, Save.
If you see Error getting user profile from external provider:
- Confirm you created an OAuth App, not a "GitHub App" (different product).
- Regenerate the Client Secret on GitHub and paste the new secret into Supabase.
- GitHub → Settings → Emails: verify your primary email; avoid blocking all email visibility if Supabase cannot read an address.
- Sign out of GitHub, sign in again, and approve the user:email permission when prompted.
- Check Supabase → Authentication → Logs for the exact failure.
3. Google OAuth
Google Cloud Console → APIs & Services → Credentials → OAuth client (Web):
- Authorized redirect URIs:
https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback
Supabase → Providers → Google: enable, paste Client ID and Secret.
If the OAuth consent screen is in Testing, add your Google account under Test users.
4. Environment variables
NEXT_PUBLIC_SUPABASE_URL=https://xxxx.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ... # legacy anon JWT, or publishable key NEXT_PUBLIC_APP_URL=http://localhost:3001
If sign-in still fails, try the anon (JWT, starts with eyJ) key from Supabase → Project Settings → API instead of the publishable key, then restart npm run dev.
5. Database (profiles)
Run supabase/schema-app.sql on the app Supabase project in .env.
Back to Installation or home to try sign-in again.