When a user in my application claps virtually in the theatre, it will send a request for increasing a count by 1 in Supabase.
Currently, I am using signInWithPassword
for authentication and the update RLS policy is enabled for authenticated users only.
However, with the approach, the user can open the Chrome console, copy the request headers, including apikey
and authentication
, and update the count by sending additional requests, e.g. by using Postman.
What should I do to prevent this? I tried to set the JWT expiration time to 1 sec and successfully acheived the goal, but this solution sounds strange.