-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Problem Description
User authentication (login/signup) is failing with a validation error indicating that OAuth providers are not properly enabled in Supabase configuration.
Error Details
{
"code": 400,
"error_code": "validation_failed",
"msg": "Unsupported provider: provider is not enabled"
}Impact
- Severity: Critical π΄
- User Experience: Users cannot sign up or log in
- Affected Feature: Core authentication system
- Business Impact: No user registration or authentication possible
Root Cause Analysis
Initial investigation revealed that while OAuth providers appear to be configured in Supabase dashboard, there may be:
- Provider Configuration Issues: OAuth credentials not properly set up
- Redirect URI Mismatches: Callback URLs not matching configuration
- Environment Variable Issues: Missing or incorrect Supabase configuration
Investigation Results
β
Diagnostic Script Results (scripts/check-supabase-auth.js):
π Checking Supabase authentication configuration...
π‘ Supabase URL: https://qypdxjufzwombujqgkhz.supabase.co
π Using anon key: eyJhbGciOiJIUzI1NiIs...
π§ͺ Testing basic connection...
β
Basic auth connection successful
π§ͺ Testing OAuth providers...
β
GOOGLE OAuth: Configured
β
GITHUB OAuth: Configured
β
FACEBOOK OAuth: Configured
β
TWITTER OAuth: Configured
Solution Steps
1. Verify Supabase Dashboard Configuration
Required Actions:
- Go to Supabase Dashboard
- Select project:
qypdxjufzwombujqgkhz - Navigate to Authentication > Providers
- Verify each OAuth provider is enabled and properly configured
2. Google OAuth Configuration
Steps:
- Go to Google Cloud Console > APIs & Services > Credentials
- Create/verify OAuth 2.0 Client ID for project:
vinci-scroll - Critical: Add authorized redirect URI:
https://qypdxjufzwombujqgkhz.supabase.co/auth/v1/callback - Copy Client ID and Client Secret to Supabase
3. Environment Variables Check
Required Variables:
SUPABASE_URL=https://qypdxjufzwombujqgkhz.supabase.co
SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Implementation Status
π§ IN PROGRESS - Diagnostic tools created in commit 43ca42c
Files Created:
scripts/check-supabase-auth.js- Authentication diagnosticsscripts/fix-critical-issues.js- Comprehensive issue resolutionfrontend/src/contexts/AuthContext.tsx- Authentication contextfrontend/src/components/AuthModal.tsx- Login/signup UIfrontend/src/app/auth/callback/page.tsx- OAuth callback handler
Testing Steps
-
Run Diagnostic Script:
node scripts/check-supabase-auth.js
-
Test Authentication Flow:
npm run dev:backend cd frontend && npm run dev
- Visit
http://localhost:3004 - Click "Sign In" button
- Test Google OAuth login
- Visit
-
Verify Callback Handling:
- Check OAuth redirect to
/auth/callback - Verify successful authentication state
- Check OAuth redirect to
Manual Configuration Required
- Supabase Dashboard: Enable and configure OAuth providers
- Google Cloud Console: Set up OAuth credentials with correct redirect URIs
- Environment Setup: Ensure all required variables are properly configured
Related Files
frontend/src/contexts/AuthContext.tsxfrontend/src/components/AuthModal.tsxfrontend/src/app/auth/callback/page.tsxscripts/check-supabase-auth.jsscripts/fix-critical-issues.js
Priority Actions
- π΄ Immediate: Configure Google OAuth in Google Cloud Console
- π΄ Immediate: Verify Supabase OAuth provider settings
- π‘ Follow-up: Test complete authentication flow
- π‘ Follow-up: Add additional OAuth providers if needed
Status: π§ NEEDS CONFIGURATION
Priority: Critical
Labels: bug, critical, authentication, oauth, supabase
Reactions are currently unavailable