auth

Embed
Preview of the card
<a href="https://lucida.15-204-158-166.sslip.io/docs/ref-auth"><img src="https://lucida.15-204-158-166.sslip.io/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/8834a97f-36a0-4c36-939c-0fdb4d64a504/social-card.svg?v=3e7ae33eec8b" alt="auth" width="600" height="315"></a>
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/atlas/backchannel-logout

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/atlas/backchannel-logout"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Sessions ended
400 invalid logout token
404
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/atlas/before-user-create

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/atlas/before-user-create"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 {} admits; {deny: true, reason} refuses
401 bad signature
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/auth/atlas/callback

Parameters

codestringquery
statestringquery
errorstringquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/auth/atlas/callback"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

303 Session cookies set; redirect into the app, or to /login?atlas_error=<cancelled|expired|closed|disabled|failed>
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/auth/atlas/start

Parameters

return_tostringquery
screen_hintstringquery
invitestringquery
login_hintstringquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/auth/atlas/start"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

303 Redirect to Atlas
404 Atlas not configured
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/atlas/webhooks

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/atlas/webhooks"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 processed or ignored
401 bad signature
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/auth/config

What the sign-in and signup pages need before the user types anything.

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/auth/config"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "atlas": {
    "account_url": "string",
    "company_sso": true,
    "start_url": "string"
  },
  "captcha": {
    "provider": "string",
    "site_key": "string"
  },
  "social": [
    "string"
  ]
}
Schema
atlasAtlasPublic
Show child parameters
account_urlstringrequired
Atlas's hosted account page (password, passkeys, 2FA, devices); add ?return_to=.
company_ssobooleanrequired
Company SSO can be set up from Settings (the instance secret key is configured).
start_urlstringrequired
Same-origin route that starts the sign-in; add invite / return_to / screen_hint=signup.
captchaCaptchaPublic
Show child parameters
providerstringrequired
site_keystringrequired
socialstring[]required
Social login providers that are configured (google | gitlab | github).
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/email/change/confirm

Confirm with the token mailed to the new address: the address is replaced, every session ends and the old address gets a notice.

Request body

application/json
tokenstringrequired
{
  "token": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/email/change/confirm" \
  -H "Content-Type: application/json" \
  -d '{"token":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
400
409
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/email/verify

Confirm an email address with the mailed token.

Request body

application/json
tokenstringrequired
{
  "token": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/email/verify" \
  -H "Content-Type: application/json" \
  -d '{"token":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
400
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/email/verify-request

Mail the signed-in user a verification link.

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/email/verify-request"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

202
429
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/login

Email + password login. Sets the session cookie, or answers with a 2FA step-up.

Request body

application/json
emailstringrequired
passwordstringrequired
{
  "email": "string",
  "password": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email":"string","password":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Sets the session cookie unless mfa_required
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "email": "string",
  "id": "string",
  "is_disabled": true,
  "name": "string"
}
User
created_atstringrequired
emailstringrequired
idstringrequired
is_disabledbooleanrequired
namestringrequired
{
  "created_at": "2024-01-01T00:00:00Z",
  "email": "string",
  "id": "string",
  "is_disabled": true,
  "name": "string"
}
Option 2
mfa_requiredbooleanrequired
mfa_tokenstringrequired
{
  "mfa_required": true,
  "mfa_token": "string"
}
Option 3
mfa_enrollment_requiredbooleanrequired
userobjectrequired
Show child parameters
created_atstringrequired
emailstringrequired
idstringrequired
is_disabledbooleanrequired
namestringrequired
{
  "mfa_enrollment_required": true,
  "user": {
    "created_at": "2024-01-01T00:00:00Z",
    "email": "string",
    "id": "string",
    "is_disabled": true,
    "name": "string"
  }
}
Option 4
confirmation_requiredbooleanrequired
{
  "confirmation_required": true
}
401
429 rate limited; Retry-After set
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/login/confirm

Finish a password login that needed emailed confirmation; the session starts here.

Request body

application/json
tokenstringrequired
The token from the emailed link.
{
  "token": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/login/confirm" \
  -H "Content-Type: application/json" \
  -d '{"token":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Sets the session cookie

Same as 200 · POST /v1/auth/login

401
429
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/logout

Revoke the current session.

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/logout"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/logout-all

Revoke every session of the caller, including this one.

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/logout-all"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
401
POSThttps://lucida.15-204-158-166.sslip.io/v1/auth/mfa

Second step of login: exchange the challenge token + code for a session.

Request body

application/json
codestringrequired
6-digit authenticator code, or a recovery code.
mfa_tokenstringrequired
{
  "code": "string",
  "mfa_token": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/auth/mfa" \
  -H "Content-Type: application/json" \
  -d '{"code":"string","mfa_token":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Sets the session cookie
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "email": "string",
  "id": "string",
  "is_disabled": true,
  "name": "string"
}
Schema
created_atstringrequired
emailstringrequired
idstringrequired
is_disabledbooleanrequired
namestringrequired
401
429

Updated