S
Supabase2mo ago
Thọ

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!
No description
10 Replies
ihm40
ihm402mo ago
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
ihm40
ihm402mo ago
No description
ihm40
ihm402mo ago
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
Thọ
ThọOP2mo ago
i can't update default
No description
Thọ
ThọOP2mo ago
can you update the function in auth schema
ihm40
ihm402mo ago
interesting, yeah i can update it
Fieryduck82579
Fieryduck825792mo ago
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.
No description
Thọ
ThọOP2mo ago
You use selfhost or supabase cloud? I'm using cloud and i can't edit
Fieryduck82579
Fieryduck825792mo ago
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.
Fieryduck82579
Fieryduck825792mo ago
Did you try @ihm40 's suggestion? This is what I would have done. Supabase doesn't prevent you from modifying the managed schema.
No description

Did you find this page helpful?