Single Sign-On
Sign in through any OIDC provider, and optionally turn passwords off.
Works with Authentik, Keycloak, Zitadel, Entra ID, Google Workspace, or any OIDC provider. Off by default.
Requirements
- Sharkord on HTTPS.
- A confidential client in your provider. Sharkord uses a client secret plus PKCE, so a public client will not work.
Provider
| Setting | Value |
|---|---|
| Redirect URI | https://your-domain.com/oidc/callback |
| Grant type | Authorization code with PKCE (S256) |
| Scopes | openid profile email |
| Client auth | client_secret_post or client_secret_basic |
Sharkord
In config.ini, or the matching SHARKORD_OIDC_* env variables:
[oidc]
enabled=true
issuer=https://auth.example.com/application/o/sharkord/
clientId=your-client-id
clientSecret=your-client-secret
redirectUri=
disableLocalLogin=falseissuermust be HTTPS except on localhost. Endpoints are discovered from<issuer>/.well-known/openid-configurationand cached for 5 minutes.redirectUriempty means it is built from the request, usingX-Forwarded-ProtoandX-Forwarded-Hostfrom trusted proxies. If the provider says the redirect URI does not match, set it explicitly.
Restart, and the connect screen shows Sign in with SSO.
Account Matching
Returning users are matched by the provider's sub. On first sign-in:
- An existing local account with the same email is linked, only if
email_verifiedis true. - If that email is already linked to another provider account, sign-in is refused.
- Otherwise a new account is created, named from
preferred_username,name, thensub. Thepictureclaim becomes the avatar if it passes the server's checks.
New SSO accounts have no password. Linked accounts keep theirs. Bans, kicks and password changes end SSO sessions just like normal ones.
Turning Passwords Off
disableLocalLogin=true rejects password sign-in and sends people straight to the provider.
If the provider breaks, nobody can sign in. The fix is setting
disableLocalLogin=false and restarting, so make sure you can edit the
config without Sharkord.
The owner token still works for SSO accounts.