Getting data with wrong anon key
I am having some issues understanding the anon key and it's role.
I thought that it was a way to identify which project you are connecting to. With this in mind,
this is a separate thing then authentication and the anon key is not used to protect your data.
But, if the anon key is a way to identify which project your data is coming from, why is it that
when I use the wrong anon key, it lets me authenticate and get data from that project anyways?
I tested this out with the local running instance of supabase and even though the anon key is off,
I can still get data from a table. What is the point of the anon key at this point?
Here is the deno script I created to demonstrate what I am talking about:
The RLS policy I have on the student table is:
I thought that it was a way to identify which project you are connecting to. With this in mind,
this is a separate thing then authentication and the anon key is not used to protect your data.
But, if the anon key is a way to identify which project your data is coming from, why is it that
when I use the wrong anon key, it lets me authenticate and get data from that project anyways?
I tested this out with the local running instance of supabase and even though the anon key is off,
I can still get data from a table. What is the point of the anon key at this point?
Here is the deno script I created to demonstrate what I am talking about:
The RLS policy I have on the student table is: