Documentation

Understanding API Keys | Supabase Docs

What is the ANON Key?

📖 Story: What Happens Without RLS?

  1. You own the database.
  2. If someone has the ANON KEY this tells the application that they’re welcome to read your tables.
  3. However, we still need to put Row Level Security policies on the sensitive parts of our application. For example, we don’t want people to read other users messages in our database.

If you had RLS, you could set a rule:

“Visitors can only see their own messages”

  1. Cursor Chat

    In the frontend code, use the NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY to test the connection to the database.