ian_
05/14/2022, 3:50 PMsupabase.auth.user().identities[0].identity_data.provider_id
within an RLS policy?Needle
05/14/2022, 3:50 PMburggraf
05/14/2022, 7:03 PMcreate or replace function auth.uid() returns uuid as $$
select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;
$$ language sql stable;
so you'd have to look to see if provider_id is saved in the jwt (I don't think it is)...
If it's not, you'd have to do a lookup on the auth.identities table, which won't scale well, but it's doable.Needle
05/14/2022, 7:03 PMian_
05/14/2022, 7:06 PMburggraf
05/14/2022, 7:40 PMgaryaustin
05/14/2022, 11:05 PM