Stop calling PostgREST “MAGIC”
medium.freecodecamp.org
medium.freecodecamp.org
Do I create for every "web user" a new database user?
Or can I reference the "userId" from the JWT as an selector?
Example:
Reqest: curl -H "Auth.... crypt(userId=2)" /todo/1 SQL: select * from todo where id=1 and userId = 2
?
you use the user_id from the jwt tokens in your RLS policies and view definitions. More details here https://github.com/subzerocloud/postgrest-starter-kit/wiki/A...