- Migration: profiles.username is now nullable -- Google's OAuth redirect can't collect a username up front the way the email/password signup form does, so a first-time Google sign-in's profile is created with no username. - supabase/config.toml: [auth.external.google] enabled, credentials via env() substitution (SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID/_SECRET in .env.local, which the CLI auto-loads). skip_nonce_check is on, which Supabase's own docs call out as required for local sign-in. - LoginScreen: "Continue with Google" alongside the existing email/password form. - CompleteProfileScreen: one-time gate for a signed-in user with no username yet (i.e. first Google sign-in) -- same hard-gate spirit as email verification, nothing else is usable until a username is set. - App.tsx now checks profiles.username after establishing a session and routes to CompleteProfileScreen before AppShell when it's missing. RLS test suite re-run clean (23/23) after the schema change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017DUU6CnxECCDeqDNYJgr5x
13 lines
653 B
Bash
13 lines
653 B
Bash
# Copy to .env.local (gitignored) and fill in. For local dev, run
|
|
# `npx supabase status` after `npx supabase start` to get these values —
|
|
# they're stable, well-known local dev credentials, not secrets.
|
|
VITE_SUPABASE_URL=http://127.0.0.1:54321
|
|
VITE_SUPABASE_ANON_KEY=
|
|
|
|
# Google OAuth credentials (real secrets — from your own Google Cloud
|
|
# project, never commit real values). Read by the Supabase CLI itself for
|
|
# supabase/config.toml's env() substitution, not by the frontend.
|
|
# Authorized redirect URI to set in Google Cloud: http://127.0.0.1:54321/auth/v1/callback
|
|
SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID=
|
|
SUPABASE_AUTH_EXTERNAL_GOOGLE_SECRET=
|