Sign Up
Loading...

Per‑user data access and authentication

Asked by Troy on September 18, 2024

Can I add user accounts (email/password) so each user can only PUT/GET/DELETE their own data? Do I need to add email and password fields, and how do I implement this?


Answered by Twidget

Yes. Add a field to your datastore to store the user's _id when saving data. Then filter GET, PUT, and DELETE operations so they only affect records that match the authenticated user's id. This enforces per‑user access control.

Related Questions