SupabaseS
Supabase4y ago
bl

Access token in Supabase Webhooks

I need to call an endpoint when a new user is created <=> a new row is inserted in public.users. Supabase Webhooks are perfect for this.

However, I need the send the access token of that new user, is there a built-in function in Postgres (like uid() for id)?

EDIT:
Such a function might not exist, no function to directly get the access token jwt. Please correct me if I’m wrong, but, when creating Webhooks, devs maybe thought it would be better to just send user’s id — Bearer auth.uid(— and authenticate the user on the server with getUserById()… which would be very risky.
Was this page helpful?