Your UI is ready! All authentication buttons are implemented. You just need to configure the OAuth providers in your Supabase Dashboard.
- Apple Developer Account ($99/year)
- Supabase Project
- Go to https://developer.apple.com/account/resources/identifiers/list
- Click + to create new identifier
- Select Services IDs → Continue
- Enter:
- Description:
Mirhal Auth - Identifier:
com.mirhal.auth(or your bundle ID +.auth)
- Description:
- Click Continue → Register
- Click on your newly created Service ID
- Enable Sign in with Apple
- Click Configure
- Primary App ID: Select your main app ID
- Domains and Subdomains: Add:
YOUR_PROJECT_REF.supabase.co localhost - Return URLs: Add:
https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback http://localhost:3000 - Click Save → Continue → Register
- Go to Keys tab
- Click + to create new key
- Name it
Mirhal Auth Key - Enable Sign in with Apple
- Click Configure → Select your Primary App ID
- Click Save → Continue → Register
- IMPORTANT: Download the
.p8file (you can only do this once!) - Note your Key ID (10 characters)
- Go to https://developer.apple.com/account
- Find your Team ID at the top right (10 characters)
- Go to your Supabase Dashboard → Authentication → Providers
- Find Apple and click Enable
- Enter:
- Service ID:
com.mirhal.auth(from step A) - Team ID: Your 10-character Team ID
- Key ID: Your 10-character Key ID
- Private Key: Paste entire contents of
.p8file
- Service ID:
- Click Save
✅ Apple Sign In is now configured!
- Facebook Developer Account (free)
- Go to https://developers.facebook.com/apps
- Click Create App
- Select Consumer → Next
- Enter:
- App Name:
Mirhal - App Contact Email: your email
- App Name:
- Click Create App
- In your app dashboard, find Facebook Login
- Click Set Up
- Choose Web platform
- Enter your site URL:
http://localhost:3000(for development) - Click Save → Continue
- Go to Facebook Login → Settings (left sidebar)
- Valid OAuth Redirect URIs: Add:
https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback http://localhost:3000 - Click Save Changes
- Go to Settings → Basic (left sidebar)
- Note your:
- App ID: 15-16 digit number
- App Secret: Click Show to reveal
- At the top, toggle from In Development to Live
- You may need to add a Privacy Policy URL
- Click Switch Mode
- Go to Supabase Dashboard → Authentication → Providers
- Find Facebook and click Enable
- Enter:
- Facebook Client ID: Your App ID
- Facebook Client Secret: Your App Secret
- Click Save
✅ Facebook Login is now configured!
- Twitter Developer Account (free, but requires approval)
- Go to https://developer.twitter.com/en/portal/petition/essential/basic-info
- Fill out the application (may take 24-48 hours for approval)
- Once approved, go to https://developer.twitter.com/en/portal/dashboard
- Click + Create Project
- Project Name:
Mirhal - Use Case: Select appropriate option
- Project Description: Describe your app
- Click Next → Create App
- Enter App Name:
Mirhal Auth
- In your app settings, go to User authentication settings
- Click Set up
- App Permissions: Select Read
- Type of App: Select Web App
- App Info:
- Callback URI:
https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback - Website URL:
https://mirhal.apporhttp://localhost:3000
- Callback URI:
- Click Save
- Go to Keys and tokens tab
- Note your:
- Client ID: Long string
- Client Secret: Click Regenerate to get (save immediately!)
- Go to Supabase Dashboard → Authentication → Providers
- Find Twitter and click Enable
- Enter:
- Twitter Client ID: Your Client ID
- Twitter Client Secret: Your Client Secret
- Click Save
✅ Twitter/X Sign In is now configured!
After configuring all providers:
- Open
http://localhost:3000(make sure servers are running) - Click "Sign In" button
- Try each provider:
- Click "Apple" → Should redirect to Apple login
- Click "Google" → Should redirect to Google (already working)
- Click "Facebook" → Should redirect to Facebook
- Click "X" → Should redirect to Twitter
- Complete OAuth flow
- Verify you're logged in and redirected back
Apple:
- Error
invalid_client: Check Service ID matches exactly - Error
invalid_request: Check Return URLs include Supabase callback
Facebook:
- Error
URL Blocked: Add redirect URI to OAuth settings - Can't sign in: Make sure app is Live, not In Development
Twitter:
- Error
unauthorized_client: Check callback URI matches exactly - No approval: Wait for developer account approval (can take 1-2 days)
Before going live:
- Apple: Update Return URLs to include production domain
- Facebook:
- Update Valid OAuth Redirect URIs
- Add Privacy Policy & Terms of Service URLs
- Twitter: Update Callback URI to production
- Supabase: Update redirect URLs in each provider's settings
Your .env.local already has:
VITE_SUPABASE_URL=...
VITE_SUPABASE_ANON_KEY=...
VITE_GOOGLE_WEB_CLIENT_ID=...No additional env vars needed for these providers - they're configured entirely in Supabase!