end_users key from browsers and mobile apps.
Register
POST /auth/{guard}/register
Send the login field by its field name, a password, and any other fields on the collection.
201 Created:
"status": "pending_verification" and a code is emailed. See Email verification.
What Bludia does:
- Checks registration is enabled for the guard.
- Requires the login field and a password of at least 8 characters.
- Rejects the request if an account with that login already exists.
- Saves a record with the password hashed. The new user owns their own record.
- Assigns the guard’s default
userrole. - Returns a session, so the user is signed in right away.
Login
POST /auth/{guard}/login
200 OK:
Every attempt, successful or not, is logged with IP and user agent.
Account status
User records have a status that controls login:
To block a user, change their record’s status in the dashboard. To also end their current sessions, see Sessions & tokens.
Creating users yourself
You can also add users as records in the dashboard: set the password field and it’s hashed on save. Then assign roles in Authentication → Roles. To create accounts from code, call/auth/{guard}/register (from a server if registration is closed to the public, temporarily enable it or create users in the dashboard). Don’t write password values through the records API.