Skip to main content
Plans: Pro and Enterprise. Self-hosted: Enterprise license.
On Nasiko Cloud, the workspace owner connects an identity provider from Settings → Security → Single sign-on; Free and Individual are refused. On a self-hosted open-source server, the routes on this page return 404. Behavioral guide: SSO and SCIM. Routes that need a sign-in take the session token as Authorization: Bearer <token> or the dashboard session cookie. A missing or invalid token returns 401:

SSO status

GET /api/auth/oidc/status Whether SSO is configured, and for which kind of provider. The sign-in page and nasiko auth login call it to decide whether to offer SSO. No sign-in needed.
Always 200.

Browser sign-in

GET /api/auth/oidc/login Starts a sign-in. Redirects the browser to your identity provider’s consent screen. Open it in a browser, not with an API client. GET /api/auth/oidc/callback Your identity provider sends the browser here with code and state. Nasiko checks the state, PKCE verifier, and nonce, verifies the ID token, creates or updates the user, places them in org units from their groups, and starts a session. Then it returns the browser to the redirect target. For a same-origin target, the session is set as a cookie. For a cross-origin target, the token and its lifetime are appended as #token=<token>&expires_in=<seconds>. If the sign-in fails, the browser returns to the target with #error=<code>: If SSO isn’t configured, the callback returns 503.

CLI sign-in (device code)

The OAuth 2.0 device authorization grant. nasiko auth login --sso and nasiko-ee auth login --sso use it. Sessions issued this way are ordinary sessions: they appear and can be revoked like browser sessions.

Request a code

POST /api/auth/device/code No body. No sign-in.
Returns 503 if the server can’t record the request.

Approve in the browser

GET /device shows the approval page. Without a session, it sends the browser through SSO sign-in first and comes back. With ?user_code= it shows the code to confirm. The page posts the decision to POST /device as a form (user_code, action=approve or anything else to deny). The first decision wins.

Poll for the session

POST /api/auth/device/token
On approval, 200:
Until then, 400 with an error code, as the device grant specifies: 503 means the session store is unavailable. Retry later.

SSO settings

Read the configuration

GET /api/settings/oidc
With nothing configured, every string field is null and every boolean false.

Save the configuration

PUT /api/settings/oidc Writes the issuer URL, client ID, redirect URI, and scopes exactly as sent: a field you leave out is saved as null. Read the current values first and send them back with your change. The client secret is the exception. When the result is a complete configuration, Nasiko starts a directory sync in the background. Unknown fields are rejected.
Returns the saved configuration:
To turn SSO off, clear every field and allow a later provider switch:
On a self-hosted server, also unset the OIDC_* environment variables. With no stored configuration, the server falls back to them.