S
Supabase4mo ago
Muezz

Migrating to the new API keys

I am working on moving a large project to the new API keys. From the docs, it seems pretty straight forward but we use branching along with local dev environments. So I am in process of running and testing it locally first. My auth flow is not behaving correctly at the moment. Could it be because the local env still uses the old API keys and they are not compatible with getClaims?
2 Replies
garyaustin
garyaustin4mo ago
getClaims is not based on the API keys but on asymmetric JWTs. It defaults though to calling getUser if the JWT is old style. These are two discussions with most of the latest status: https://github.com/orgs/supabase/discussions/29260 https://github.com/orgs/supabase/discussions/29289
Muezz
MuezzOP4mo ago
I see. There is also a chance this could be tied to another migration I am doing right now. I am moving my project to trpc and moved all of the auth logic from server actions to trpc procedures. Maybe the cookies are not being set because of that?

Did you find this page helpful?