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:
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:
- Created a new record in auth.instances
- Set all users' instance_id to the new instance
- Authentication still broken - returns "400: Invalid credentials"
- Discovered RLS is enabled on auth.users but there are no policies
- Created 5 different RLS policies covering all roles (anon, authenticated, service_role, authenticator, postgres, public)
- Ran GRANT SELECT on auth.users to all these roles
- Tried "Fast database reboot" from dashboard
- Nothing workedCurrent state:
- Can't log in (password or OAuth)
- Dashboard shows "Total: 1,544 users" but displays "No users in your project"
- Auth logs show "400: Invalid credentials"
- 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