Hashboard supports OpenID Connect (OIDC) single sign-on as an optional sign-in method for humans. When configured, a Continue with SSO button appears on the login page alongside (or instead of) local username/password. OIDC provisioning is entirely independent of local account registration settings — the IdP governs who can sign in via SSO, and Hashboard provisions a principal on first login automatically.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cryguy/hashboard/llms.txt
Use this file to discover all available pages before exploring further.
Required environment variables
Four environment variables must be set to enable OIDC:| Variable | Description |
|---|---|
OIDC_ISSUER | The issuer URL of your IdP (must expose /.well-known/openid-configuration). |
OIDC_CLIENT_ID | The client ID of the Hashboard application registered in your IdP. |
OIDC_CLIENT_SECRET | The client secret for that application. |
ORIGIN | The public base URL of your Hashboard instance, e.g. https://hashboard.example.com. |
ORIGIN is required whenever OIDC is enabled. The SvelteKit adapter-node
runtime cannot infer the public-facing origin on its own, so Hashboard uses
ORIGIN to construct the absolute redirect_uri sent to your IdP. Without
it, the callback URL will be wrong and sign-in will fail.Provider setup example (Authentik)
In your Authentik admin panel, create an OAuth2/OpenID Connect provider for Hashboard and set the redirect URI to your Hashboard callback URL. Then set the following in your Hashboard.env (or environment):
Authentication flow
User clicks Continue with SSO
The browser is redirected to
GET /auth/oidc. Hashboard generates a PKCE
code challenge, a nonce, and a state value, stores them in a short-lived
hb_oidc cookie, and redirects to your IdP’s authorization endpoint.IdP authenticates the user
The user authenticates at their IdP (password, MFA, etc.). After success,
the IdP redirects back to Hashboard’s callback URL with an authorization
code.
Hashboard handles the callback
GET /auth/callback exchanges the code for tokens, verifies the nonce, and
extracts the OIDC subject (sub) claim. Discovery hits the issuer’s
/.well-known/openid-configuration once per process and is then cached —
subsequent logins do not incur another round-trip.Principal is upserted
Hashboard looks up the principal by OIDC subject. If no match exists, a new
principal is created. If this is the very first human on the instance, that
principal is also assigned the
super role. If a matching principal already
exists, it is returned as-is (display name is not overwritten on repeat
logins).Discovery caching
oidcConfigured() checks only the environment variables — it never makes a network request. This allows the sign-in page to render immediately without blocking on a round-trip to the IdP. The actual OIDC discovery document is fetched lazily on the first sign-in attempt and cached for the lifetime of the process.
Linking and unlinking OIDC
A single Hashboard account can hold both a local password and an OIDC identity at the same time. This is useful when an instance starts OIDC-only and you later want to add local-password fallback access. Add local login to an OIDC-provisioned account:Running without OIDC
OIDC is entirely optional. IfOIDC_ISSUER, OIDC_CLIENT_ID, and OIDC_CLIENT_SECRET are not set, oidcConfigured() returns false and no OIDC button is rendered on the login page. The GET /auth/oidc and GET /auth/callback routes are effectively inert. The instance runs on local accounts alone.