Skip to content

Single sign-on

Configure OIDC providers and run the browser sign-in redirects.

GET/api/auth/sso/config
PUT/api/auth/sso/config
POST/api/auth/sso/config/test
GET/api/auth/sso/providers
POST/api/auth/sso/providers
POST/api/auth/sso/providers/test
PUT/api/auth/sso/providers/order
POST/api/auth/sso/providers/:id/test
PATCH/api/auth/sso/providers/:id
DELETE/api/auth/sso/providers/:id
GET/api/auth/sso/public-status
POST/api/auth/sso/exchange
GET/api/auth/sso/callback
GET/api/auth/sso/callback/:providerId
POST/api/auth/sso/link/info
POST/api/auth/sso/confirm-link
POST/api/auth/sso/confirm-link/send-code
POST/api/auth/sso/link/cancel
POST/api/auth/sso/link/approve-info
POST/api/auth/sso/link/approve
GET/api/auth/sso/connect/providers
POST/api/auth/sso/connect/start
GET/api/auth/sso/:orgSlug
GET/api/auth/sso/:orgSlug/callback

Read legacy SSO config ​

GET/api/auth/sso/config

Authentication: bearer token.
Permission: settings.sso.

bash
curl -X GET "https://shellius.example.com/api/auth/sso/config" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Upsert legacy SSO config ​

PUT/api/auth/sso/config

Authentication: bearer token.
Permission: settings.sso.

Request body

NameTypeRequiredNotes
providerstringYesOne of oidc, saml.
presetIdstringNoOne of google, entra, okta, auth0, generic-oidc, saml.
clientIdstringYes1–500 characters.
clientSecretstringNo1–2000 characters.
issuerUrlstringYes
redirectUristringNo
scopesstringNoAt most 500 characters.
isActivebooleanNo
defaultRolestringNoAt most 100 characters.
defaultGroupIdstringNoMay be null.
autoProvisionbooleanNo
allowedDomainsarrayNoAt most 50.
requireVerifiedEmailbooleanNo
tenantIdstringNo
oktaDomainstringNo
auth0DomainstringNo
bash
curl -X PUT "https://shellius.example.com/api/auth/sso/config" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "oidc",
    "clientId": "…",
    "issuerUrl": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Test legacy SSO config ​

POST/api/auth/sso/config/test

Authentication: bearer token.
Permission: settings.sso.

Request body

NameTypeRequiredNotes
providerstringNoOne of oidc, saml.
issuerUrlstringNo
bash
curl -X POST "https://shellius.example.com/api/auth/sso/config/test" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "oidc",
    "issuerUrl": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

List SSO providers ​

GET/api/auth/sso/providers

Revision 2 — GET/POST/PATCH/DELETE /api/auth/sso/providers.

Authentication: bearer token.
Permission: settings.sso.

bash
curl -X GET "https://shellius.example.com/api/auth/sso/providers" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Create SSO provider ​

POST/api/auth/sso/providers

Authentication: bearer token.
Permission: settings.sso.

Request body

NameTypeRequiredNotes
namestringYes1–120 characters.
presetIdstringYes
clientIdstringYes1–500 characters.
clientSecretstringNo1–2000 characters.
issuerUrlstringNo
scopesstringNoAt most 500 characters.
defaultRolestringYesAt most 100 characters.
defaultGroupIdstringNoMay be null.
autoProvisionbooleanYes
allowedDomainsarrayYesAt most 50.
allowedOrgsarrayNoDefault []. 1–100.
requireVerifiedEmailbooleanYes
isActivebooleanYes
bash
curl -X POST "https://shellius.example.com/api/auth/sso/providers" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "…",
    "presetId": "…",
    "clientId": "…",
    "defaultRole": "…",
    "autoProvision": false,
    "allowedDomains": [],
    "requireVerifiedEmail": false,
    "isActive": false
  }'

201 Created

json
{ "success": true, "data": { … } }

Test unsaved provider draft ​

POST/api/auth/sso/providers/test

Unsaved draft test. MUST be registered before /providers/:id/test so Express doesn't treat "test" as an :id.

Authentication: bearer token.
Permission: settings.sso.

Request body

NameTypeRequiredNotes
presetIdstringNo
issuerUrlstringNo
bash
curl -X POST "https://shellius.example.com/api/auth/sso/providers/test" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "presetId": "…",
    "issuerUrl": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Reorder providers ​

PUT/api/auth/sso/providers/order

Authentication: bearer token.
Permission: settings.sso.

Request body

NameTypeRequiredNotes
idsarrayYesAt least 1.
bash
curl -X PUT "https://shellius.example.com/api/auth/sso/providers/order" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": []
  }'

200 OK

json
{ "success": true, "data": { … } }

Test saved provider ​

POST/api/auth/sso/providers/:id/test

Authentication: bearer token.
Permission: settings.sso.

Path parameters

NameTypeNotes
idstring
bash
curl -X POST "https://shellius.example.com/api/auth/sso/providers/{id}/test" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Update provider ​

PATCH/api/auth/sso/providers/:id

Authentication: bearer token.
Permission: settings.sso.

Path parameters

NameTypeNotes
idstring

Request body

NameTypeRequiredNotes
namestringNo1–120 characters.
presetIdstringNo
clientIdstringNo1–500 characters.
clientSecretstringNoAt most 2000 characters.
issuerUrlstringNo
scopesstringNoAt most 500 characters.
defaultRolestringNoAt most 100 characters.
defaultGroupIdstringNoMay be null.
autoProvisionbooleanNo
allowedDomainsarrayNoAt most 50.
allowedOrgsarrayNo1–100.
requireVerifiedEmailbooleanNo
isActivebooleanNo
bash
curl -X PATCH "https://shellius.example.com/api/auth/sso/providers/{id}" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "…",
    "presetId": "…",
    "clientId": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Delete provider ​

DELETE/api/auth/sso/providers/:id

Authentication: bearer token.
Permission: settings.sso.

Path parameters

NameTypeNotes
idstring

Query parameters

NameTypeRequiredNotes
force—No
bash
curl -X DELETE "https://shellius.example.com/api/auth/sso/providers/{id}" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Public SSO summary for login page ​

GET/api/auth/sso/public-status

Authentication: none.

bash
curl -X GET "https://shellius.example.com/api/auth/sso/public-status"

200 OK

json
{ "success": true, "data": { … } }

Trade one-time SSO callback code for session ​

POST/api/auth/sso/exchange

Public; trades a one-time callback code for a login-shaped response (so MFA applies uniformly to SSO sign-ins). MUST be registered before /:orgSlug (different HTTP method, but kept here for readability).

Authentication: none.

Request body

NameTypeRequiredNotes
codestringYes
bash
curl -X POST "https://shellius.example.com/api/auth/sso/exchange" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

OIDC/GitHub callback ​

GET/api/auth/sso/callback

No-orgSlug callback — the single redirect URI registered with the IdP. The org is derived from the signed state. MUST be registered before /:orgSlug.

Authentication: none.

Query parameters

NameTypeRequiredNotes
code—No
state—No
bash
curl -X GET "https://shellius.example.com/api/auth/sso/callback"

200 OK

json
{ "success": true, "data": { … } }

Per-provider callback ​

GET/api/auth/sso/callback/:providerId

Revision 2 — per-provider callback (this is the callbackUrl in SsoProviderDTO, registered at the IdP). Provider resolution still trusts the server-side state (not this path param) for security; the param exists so each provider gets a distinct, registerable redirect URI.

Authentication: none.

Path parameters

NameTypeNotes
providerIdstring

Query parameters

NameTypeRequiredNotes
code—No
state—No
bash
curl -X GET "https://shellius.example.com/api/auth/sso/callback/{providerId}"

200 OK

json
{ "success": true, "data": { … } }

Sso link info ​

POST/api/auth/sso/link/info

What is being linked (for /sso/link)

Authentication: none.
Rate limit: 10 requests per minute per IP address.

Request body

NameTypeRequiredNotes
tokenstringYes
bash
curl -X POST "https://shellius.example.com/api/auth/sso/link/info" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Sso confirm link ​

POST/api/auth/sso/confirm-link

Password (+ MFA) proof, then link + sign in.

Authentication: none.
Rate limit: 10 requests per minute per IP address.

Request body

NameTypeRequiredNotes
tokenstringYes
passwordstringNo1–200 characters.
methodstringNoOne of totp, email, backup.
codestringNo1–64 characters.
bash
curl -X POST "https://shellius.example.com/api/auth/sso/confirm-link" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Sso confirm link send code ​

POST/api/auth/sso/confirm-link/send-code

Email the MFA code (step 2)

Authentication: none.
Rate limit: 10 requests per minute per IP address.

Request body

NameTypeRequiredNotes
tokenstringYes
bash
curl -X POST "https://shellius.example.com/api/auth/sso/confirm-link/send-code" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Sso link cancel ​

POST/api/auth/sso/link/cancel

"Cancel" on /sso/link burns the token.

Authentication: none — the token in the request is the credential.
Rate limit: 10 requests per minute per IP address.

Request body

NameTypeRequiredNotes
tokenstringYes
bash
curl -X POST "https://shellius.example.com/api/auth/sso/link/cancel" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Sso link approve info ​

POST/api/auth/sso/link/approve-info

What the emailed approval is for.

Authentication: none.
Rate limit: 5 requests per 15 minutes per IP address.

Request body

NameTypeRequiredNotes
tokenstringYes
bash
curl -X POST "https://shellius.example.com/api/auth/sso/link/approve-info" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Sso link approve ​

POST/api/auth/sso/link/approve

The emailed approval: links, no sign-in.

Authentication: none.
Rate limit: 5 requests per 15 minutes per IP address.

Request body

NameTypeRequiredNotes
tokenstringYes
bash
curl -X POST "https://shellius.example.com/api/auth/sso/link/approve" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Sso connect providers ​

GET/api/auth/sso/connect/providers

The caller's org's active providers (for Profile → Sign-in methods). Same public-safe DTO as the login page.

Authentication: bearer token.
Permission: any signed-in user.

bash
curl -X GET "https://shellius.example.com/api/auth/sso/connect/providers" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Sso connect start ​

POST/api/auth/sso/connect/start

Authentication: bearer token.
Permission: any signed-in user.

Request body

NameTypeRequiredNotes
providerIdstringYes1–100 characters.
bash
curl -X POST "https://shellius.example.com/api/auth/sso/connect/start" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "providerId": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Start SSO for org ​

GET/api/auth/sso/:orgSlug

Authentication: none.

Path parameters

NameTypeNotes
orgSlugstring

Query parameters

NameTypeRequiredNotes
provider—No
bash
curl -X GET "https://shellius.example.com/api/auth/sso/{orgSlug}"

200 OK

json
{ "success": true, "data": { … } }

Legacy per-org callback ​

GET/api/auth/sso/:orgSlug/callback

Legacy per-org callback (kept for back-compat with older IdP registrations).

Authentication: none.

Path parameters

NameTypeNotes
orgSlugstring

Query parameters

NameTypeRequiredNotes
code—No
state—No
bash
curl -X GET "https://shellius.example.com/api/auth/sso/{orgSlug}/callback"

200 OK

json
{ "success": true, "data": { … } }
Was this page helpful?No, tell us why