Cannot create new branch due to modified auth.jwt() — need help resetting to default
Hi everyone,
I’m running into an issue with my Supabase project:
In the past, when the auth schema was still editable, I updated the auth.jwt() function for development purposes.
Now, Supabase has locked down the auth schema (owned by supabase_auth_admin).
Because of my past migration, whenever I try to create a new branch in Supabase Studio, the process fails. It errors out on auth.jwt() with:
permission denied for schema auth
This means I can’t spin up a new branch to continue feature development.
What I need help with:
How can I reset the auth.jwt() function back to the default implementation that Supabase ships with?
Or is there a way to skip/repair that old migration so branch creation works again?
If anyone has faced this before or knows how the Supabase team can restore the default auth schema functions, please let me know 🙏
Thanks in advance!

10 Replies
1) I don't know if that restriction to modify auth schema applies to the functions, i was just able to go in and make a change to my auth.jwt function now so i would suggest seeing if that is possible for you also

Here is what i have if you want to compare
2) Even thought supabase has locked down the schema from the dashboard to be read only, you can still write SQL to modify the schema (though as you have seen it is not recommended and may lead to some incompatible state in the future)
but if you are trying to revert to what supabase already has then that might be fine
i can't update default

can you update the function in auth schema
interesting, yeah i can update it
I believe the restriction applies to everything in the
auth
schema. I am on v2.40.7, and the schema is fully locked in the dashboard.
You use selfhost or supabase cloud?
I'm using cloud and i can't edit
I use the cloud too, but I develop locally. I rarely touch the dashboard in the cloud.
I just checked, the dashboard in the cloud is also locked.
Did you try @ihm40 's suggestion? This is what I would have done. Supabase doesn't prevent you from modifying the managed schema.
