palbaseDocs

Palbase Auth API · API

POST/auth/login

Password login

Authenticate with email + password. On success returns an access / refresh token pair. If the account requires MFA the response is a JSON envelope with mfa_required: true and an mfa_token to be replayed against /auth/mfa/*. If risk-based step-up is required the envelope carries step_up_required: true.

Account lockout (PCI DSS 8.3.4): 10 failures within 30 min triggers a temporary lock — the response is HTTP 429 with a retry_after field (seconds).

Called by your app, with the publishable key.

Headers

X-PoW-Challenge-IDstring · optionalThe challenge a previous `pow_required` answer carried.
X-PoW-Noncestring · optionalThe nonce that solves it.

Request body

auth_request_idstring · optionalLinks the sign-in to a pending /oauth/authorize request; on success the answer names the callback to send the browser to (`oidc_callback_url`). A request that is not waiting (unknown, expired, completed) is refused with 400 `auth_request_invalid` before the password is checked. A sign-in that answers `mfa_required` carries the request in its `mfa_token`: the challenge that completes the sign-in completes the request and answers the callback.
emailstring (email) · required
fingerprint_hashstring · optionalThe device fingerprint the trusted device was registered with.
fingerprint_visitor_idstring · optionalThe visitor id the Fingerprint agent produced on this device; scored by the risk engine when the project has connected Fingerprint.
passwordstring (password) · required
trusted_device_tokenstring · optionalA trusted device's token (POST /auth/trusted-devices): with its fingerprint_hash, the second factor is not asked for on that device.
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/login" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "content-type: application/json" \
  -d '{"email":"user@example.com","password":"string"}'

Responses

200Login result — token pair, MFA challenge, or step-up challenge

400Validation failed or required field missing

401Missing, invalid, or expired credentials

403A proof of work is required (`pow_required`, with the challenge), or the sign-in is refused.

429Account locked or rate limited

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation Login of auth's contract.