Hi there, newbie Supabase user here ๐Ÿ™‚ I want to ...
# help
n
Hi there, newbie Supabase user here ๐Ÿ™‚ I want to create admin panel for a web app. What is your recommendation if I want to login like usual in client side, then do administrative task in this admin panel? 1. Make much more complex RLS policies that check user's
isAdmin
column. So user can login with anon key clientside. 2. Send the JWT after client side login to serverside. Verify it. And do administrative supabase function with servicekey.
m
You can probably follow this example in order to implement rbac. I donโ€™t think there is a way as of now to add custom roles to a user. https://github.com/supabase/supabase/tree/master/examples/nextjs-slack-clone