Scoped authentication
Hello everyone! I tried to search across Supabase documentation but cannot find anything relevant
Is there a way to "scope" the authentication? I have 1 Supabase project, and 2 platforms : customer platform and admin platform. I don't want an already logged customer to access the admin, or an admin to be logged as "admin@platform.com" when going onto the customer platform
I cannot use 2 different Supabase project as I need also the database to be the same etc...
I could handcraft a solution by checking the user type by retrieving from the DB and triggering a logout, but honestly I'd prefer a real solution
How do you manage to do this ?
Thank you very much :
Is there a way to "scope" the authentication? I have 1 Supabase project, and 2 platforms : customer platform and admin platform. I don't want an already logged customer to access the admin, or an admin to be logged as "admin@platform.com" when going onto the customer platform
I cannot use 2 different Supabase project as I need also the database to be the same etc...
I could handcraft a solution by checking the user type by retrieving from the DB and triggering a logout, but honestly I'd prefer a real solution
How do you manage to do this ?
Thank you very much :