Private access page can still be accessed by all users (Supabase Auth)

Hello,

I’m trying to restrict a page to users that belong to a specific group (“premium users”).
The issue is that I can still access that page even if I’m not logged or if I’m logged in but not with the appropriate role.

Here’s a screenshot of the user var when I’m logged in (current logged in user has the role “free”):
Screenshot 2023-10-07 at 11.18.47

Here’s a screenshot of the private access settings for the Premium page:

And here’s a screenshot of the different roles I created (free, premium and admin) and the user group (premium users):

In Supabase, I have those 3 tables:

I would like users not logged in or without the correct role to be redirected to the Home page.

Can someone please help me with this issue?

Thanks

I’m guessing that’s not a feature included in the free (standard) plan.

Hello

The authentication with private access page will be only in production. In the editor you have access to all the pages to simplify your development

2 Likes

Thanks @Mael !