SupabaseS
Supabase2mo ago
jors

Completely locked out of auth - RLS enabled on auth.users, can't disable it

Hey everyone, I really need help. I made a mistake and now my entire app is down.

What I did (my mistake):
I was trying to clean up test users and ran UPDATE auth.users SET instance_id = NULL thinking it would help. Big mistake. This broke all authentication.

What I tried to fix it:
  1. Created a new record in auth.instances
  2. Set all users' instance_id to the new instance
  3. Authentication still broken - returns "400: Invalid credentials"
  4. Discovered RLS is enabled on auth.users but there are no policies
  5. Created 5 different RLS policies covering all roles (anon, authenticated, service_role, authenticator, postgres, public)
  6. Ran GRANT SELECT on auth.users to all these roles
  7. Tried "Fast database reboot" from dashboard
  8. Nothing workedCurrent state:
  9. Can't log in (password or OAuth)
  10. Dashboard shows "Total: 1,544 users" but displays "No users in your project"
  11. Auth logs show "400: Invalid credentials"
  12. When I try ALTER TABLE auth.users DISABLE ROW LEVEL SECURITY; I get "must be owner of table users"I'm on the free plan and submitted a support ticket but honestly panicking a bit. Is there anything else I can try? Or am I stuck waiting for support to manually disable RLS with superuser access?All my data is still there, I just can't authenticate anyone. Any help would be super appreciated 🙏
Was this page helpful?