I'm most definetly missing something but I've been...
# javascript
y
I'm most definetly missing something but I've been trying to look for an example where someone has gotten
await supabase.auth.api.inviteUserByEmail(email)
to work with the
service_role
. But I have no idea where the service role goes or how to make it actually work properly so for future seekers of this PostHog Actually has some docs on how it works (in thread)
so in your server you need to create a new Client that takes in the service role and then use that instead of
supabase
.
auth.api.inviteUserByEmail(email)
s
It's also noted in the official docs that it requires a service_role key: https://supabase.com/docs/reference/javascript/auth-api-inviteuserbyemail#notes I agree that actual examples of how to use the service role are good for clarification though 🙂