0

I am still new with supabase. I am little concern of the security.

Now I have a react app and with the anon public API keys I can query the database CRUD.

When I navigate to the db table editor, it prompted me "WARNING : This table is publicly readable and writable. Enable Row Level Security", but I am not sure what does it mean.

Then I saw a video, the person is querying database using API with the API keys + JWT access token, I saw when user is authenticated, session with access token is return.

My question is how to use the JWT access token with the JS SDK and disable public access?

jps
  • 20,041
  • 15
  • 75
  • 79
Alvin
  • 8,219
  • 25
  • 96
  • 177

2 Answers2

0

All you have to do is to enable row level security, define your policies, and sign in the users on your frontend to query the data.

You can read on the official Supabase guide to do all of those. https://supabase.com/docs/guides/auth/row-level-security

dshukertjr
  • 15,244
  • 11
  • 57
  • 94
0

On egghead.io there is an interesting course that can help you get started on authentication using React and Supabase

Check here: https://egghead.io/lessons/react-full-stack-github-authentication-with-supabase-and-react

Joao Gui
  • 119
  • 6