BREAKING: Supabase MINOR π΄ workarounds inside [6q5902p2xd9f]
Supabase is down: 401 errors due to JWT rejections. Immediate workarounds for indie hackers.
BREAKING: Supabase JWT Authentication Outage β Immediate Action Required
Status: IDENTIFIED | Severity: MINOR | Impact: Partial Disruption
Last Updated: Now
---
π¨ What's Down & Who's Affected
Supabase is currently experiencing widespread 401 authentication failures caused by JWT token rejection across their API gateway. This affects:
NOT affected: Existing database connections using connection pooling, direct PostgreSQL clients, or API keys (anon/service role keys are unaffected at this moment).
Scope: All regions. Estimated 40-60% of API traffic impacted.
---
β‘ Immediate Workarounds (DO THIS NOW)
1. Switch to Service Role Keys Temporarily
If your app architecture allows it: ```javascript // Instead of JWT auth, use service role key const supabase = createClient(url, SERVICE_ROLE_KEY); // Add RLS checks in your backend instead ``` Warning: Only use on backend/server. Never expose in client code.2. Implement Client-Side Retry Logic
```javascript const retryFetch = async (fn, maxRetries = 3) => { for (let i = 0; i < maxRetries; i++) { try { return await fn(); } catch (e) { if (e.status === 401 && i < maxRetries - 1) { await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000)); } else throw e; } } }; ```3. Fallback to Direct PostgreSQL Connection
For critical operations: ```javascript const pool = new Pool({ connectionString: process.env.DATABASE_URL }); const result = await pool.query('SELECT * FROM users'); ``` Use only as temporary bridgeβJWT will recover.4. Disable Real-Time Subscriptions
Temporarily remove.on('*', callback) listeners and fall back to polling or webhooks.5. Cache Auth Tokens Aggressively
If users are logged in, keep their tokens in localStorage longer (within security boundaries).---
π How to Check If Your Project is Affected
1. Monitor your logs: Look for 401 Unauthorized or Invalid JWT errors
2. Test your auth endpoint:
```bash
curl -H "Authorization: Bearer YOUR_JWT" https://YOUR_PROJECT.supabase.co/rest/v1/users
```
If you get 401, you're affected.
3. Check Supabase status page: https://status.supabase.com
4. Ping Supabase Discord/Twitter: Confirm regional impact
---
π Alternative Tools to Consider (Temporary)
Don't migrate yet. This is partial, not total. Use alternatives only if your app is down.
---
π How to Monitor Recovery
1. Supabase Status Page: Check every 5 min for updates 2. Set up monitoring: ```javascript setInterval(async () => { try { const { data } = await supabase.auth.getUser(); console.log('β JWT auth working'); } catch (e) { console.log('β Still down:', e.message); } }, 30000); ``` 3. Follow @supabase on Twitter for incident updates 4. Expected recovery: 2-4 hours (typical for auth layer fixes)
---
β Bottom Line
This is fixable and temporary. Use service role keys in backend code NOW, implement retries, and monitor recovery. Your data is safe. Stay calm, stay posted.
Questions? Check the Supabase Discord #incidents channel.