Sign in with username and password
POST /auth/login
Verifies credentials against the RS user table using the same
HMAC-then-bcrypt hashing scheme RS uses (so PHP-created users
log in unchanged). On success: writes a new session token to
user.session and sets the rs_session cookie.
Request Body required
Section titled “Request Body required ”object
Example
adminName of the identity provider to authenticate against. Defaults to “password” (the built-in flow). Enterprise installs can name a registered LDAP provider (“ldap” or a per-server alias like “ldap-engineering”). Requests naming an unregistered provider get 401 — same shape as a bad password, so a probing client can’t enumerate which enterprise providers are active.
Example
passwordTOTP code (6 digits) or recovery code
(10 chars + optional hyphen) for users with 2FA
confirmed. When 2FA is enabled and this field is
missing or wrong the server returns 401 with
error: "2fa_required" (no totp_code on the request)
or error: "invalid_2fa_code" (wrong code) so the
frontend can re-prompt.
Responses
Section titled “ Responses ”Authenticated. Returns the current user; an rs_session cookie is set in the response headers.
object
How the caller was authenticated for this request.
User’s language pref (BCP47). Empty string = follow system / browser. Joined from user_profiles at /auth/me time so the frontend can hydrate the language store on first paint without a separate round-trip.
User’s theme pref. Empty string = follow system. Same
“join on /auth/me” rationale as language.
Non-null when the session was minted via POST /admin/users/{ref}/impersonate. Carries the acting admin’s ref + username so the persistent “you are acting as @target” banner can render without a separate round-trip.
object
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Unexpected server error
object
Human-readable error summary
Example
the request could not be completedIdentity provider was registered (license includes its feature flag) but the credential-verification impl has not yet landed in this binary. Distinct from 401 so the admin UI can render “build pending” vs “wrong password”.
object
Human-readable error summary
Example
the request could not be completed