palbaseDocs

Palbase Auth API · API

POST/auth/trusted-devices

Register a trusted device

Register the current device as trusted. Returns a long-lived token the SDK stores to skip MFA on future logins. The plain token is shown once. An account whose email address is not confirmed is refused (403 email_unconfirmed): no sign-in method is added to it until its address is confirmed, as its owner, proving the address, takes the account as it was opened.

Called by a signed-in user of your app, with their token and the publishable key.

Request body

device_namestring · optionalOptional human-friendly label.
fingerprint_hashstring · requiredSHA-256 hash of the client-collected device fingerprint.
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/trusted-devices" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"fingerprint_hash":"string"}'

Responses

201Trusted device registered — token shown once

400Validation failed or required field missing

401Missing, invalid, or expired credentials

409Conflict with current resource state (duplicate, race)

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

Operation RegisterTrustedDevice of auth's contract.