Skip to main content

Get the signed-in user

GET /auth/{guard}/me — needs the Bearer token.
If the user’s record was deleted, the endpoint returns 404 with "error": "account_not_found".

Update the profile

A user’s profile is a normal record, so update it with the records API:
For this to work:
  1. The user’s role needs can_update on the users collection.
  2. A row policy must let them see their own record. Self-registered users own their record, so the default owner behavior already allows it. See Row-level security.
Protect fields users shouldn’t change themselves, such as role, plan, or status. Use a beforeUpdate hook to reject or reset those fields when the request comes from an end user.