Is there any documentation on how roles work with ...
# help
j
Is there any documentation on how roles work with auth? Can't seem to get the
inviteUserByEmail
api to work due to users not having the right roles, but unsure on how to set roles for users?
s
I think this is only available when using the service_role secret which should only be used server side
j
Ahh I see... thanks! Hypothetically could I use nextjs's API routes? If so, how would/should use the service_role secret with the call... doesn't seem to be a param in the docs?
s
You would have to instantiate the Supabase client again in your nextjs API route with the
service_role
secret
instead of the
anon
public
j
Ahh of course, that makes total sense 😄
Thank you!