Migrating to using Clerk as a third party auth provider
My question is:
Is
request.jwt.claims the same as auth once the third-party integration with Clerk is setup?
---
For more context ...
In the olden days, the way we integrated Clerk with Supabase was by following this https://supabase.com/partners/integrations/clerk
In particular, we defined a function as follows
And then used that function to set an internal UUID based user_id and define RLS policies.
Now we can set up Clerk as a third party provider for Supabase and we are advised to write policies directly referencing the auth object like so:
My question is:
Is request.jwt.claims the same as auth once the third-party integration with Clerk is setup?
So, can I just redefine my requesting_user_id function to
and will that just work or will it break all my existing user_id values? Thought I would ask if this is a known thing before I spend the time and energy on testing this.
Thank you.
PS: I think that this thread is relevant https://discord.com/channels/839993398554656828/13816123723508614330 Replies