Supabase Security Rotation Steps (Click to Read)
https://claude.ai/share/31f96692-014d-4628-b56f-605e1a82d1b2
Step 1: Rotate the JWT Secret
Go to supabase.com and log in
Open your project
Click Project Settings (gear icon, bottom left sidebar)
Click Data API or JWT Keys in the settings menu
Find the Legacy JWT Secret tab
Click Change Legacy Secret
Click Generate a random secret
Read the confirmation dialog — it warns you everything breaks instantly
Confirm it
✅ Anon key and service role key auto-regenerate after this.
Step 2: Rotate the Database Password
Still in Project Settings
Click Database in the left menu
Scroll down to Database password
Click Reset database password
Save the new password in a password manager
Step 3: Get Your New API Keys
Go to Project Settings → Data API
Copy the new anon key and service role key
Step 4: Update Your App's Environment Variables
Open your
.envfile or your hosting dashboard (Vercel, Railway, etc.)Replace the old
SUPABASE_ANON_KEYandSUPABASE_SERVICE_ROLE_KEYwith the new onesRedeploy your app
Step 5: Rotate Edge Function Secrets
Go to Project Settings → Edge Functions → Secrets
Delete all old secrets
Re-add them with fresh values (OpenAI keys, any third party stuff, etc.)
Step 7: Change Dashboard Passwords + Enable MFA
Go to your Supabase account settings
Change your password
Enable MFA
Have jeet (co-owner) do the same
Step 8: Audit What Happened
Go to Logs Explorer in your project sidebar
Check for suspicious activity around March 21 (when the attacker was active)
Make sure no unknown edge functions exist in your project
Log in to comment and vote
No comments yet
Be the first to share your thoughts.