Skip to content
Discussion options

You must be logged in to vote

I would expect that anon role aka non-logged-in users to not be able to select from the public view

Can you double check that you're making the request with the anon role?

I can't reproduce your error. Do this:

create schema private;

create table private.entities( id int, name text);

create view  public.entities as
select * from private.entities;

Go to the API docs(api/default/), select the entities table, select Bash, select the anon on the "Key" dropdown. This will give you a curl snippet that makes the call as the anon role.

Then do:

curl 'https://<ref>.supabase.co/rest/v1/entities?select=id' \
-H "apikey: <the_JWT>" \
-H "Authorization: Bearer <the_JWT>"

{"hint":null,"details":nu…

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@steve-chavez
Comment options

@phuoccss
Comment options

@mtte
Comment options

@ozum
Comment options

@steve-chavez
Comment options

Answer selected by phuoccss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants