BREAKING: Supabase JWT Authentication Issues - 401 Errors Identified
Supabase experiencing widespread JWT rejection errors. Authentication services affected. Immediate workarounds and status checks available.
Incident Status
Service: Supabase Authentication & API Gateway Issue: 401 Unauthorized errors on JWT token validation Scope: Auth-dependent API requests across hosted projects Severity: High
What's Affected
Note: I'm uncertain whether this affects all regions or specific geographic zones—check your dashboard for region-specific status.
How to Check If You're Affected
1. Test Authentication:
```bash
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" https://your-project.supabase.co/rest/v1/
```
If response contains "code":"401" or "message":"Unauthorized", you're affected.
2. Check Supabase Status Page: Visit status.supabase.com for official incident updates
3. Browser Console: Look for 401 errors in network requests to supabase.co endpoints
Immediate Workarounds
1. Bypass RLS Temporarily (High Risk)
Disable RLS on non-sensitive tables while auth recovers: ```sql ALTER TABLE your_table DISABLE ROW LEVEL SECURITY; ``` ⚠️ Only for non-production environments. Re-enable immediately after.2. Use Service Role Keys
If available, temporarily authenticate with service role keys (these bypass JWT validation in some scenarios): ```javascript const { createClient } = require('@supabase/supabase-js') const supabase = createClient(URL, SERVICE_ROLE_KEY) ``` ⚠️ Service role keys bypass RLS—use only for emergency data operations.3. Implement Client-Side Token Refresh
Add aggressive token refresh logic: ```javascript supabase.auth.onAuthStateChange((event, session) => { if (event === 'SIGNED_IN') { // Force token refresh supabase.auth.refreshSession() } }) ```4. Use Alternative Authentication Method
Temporarily authenticate via:5. Cache Previous Responses
Implement aggressive caching for read operations to reduce auth-required requests: ```javascript const cached = localStorage.getItem('data_cache') if (cached && !isStale(cached)) return JSON.parse(cached) ```Alternatives While Issue Persists
Recovery Checklist
Next Steps
Monitor official Supabase updates. Do NOT commit temporary workarounds like disabled RLS to production.
I'm uncertain about: Specific root cause (infrastructure vs. auth service), ETA for resolution, and whether JWT refresh tokens are also affected.