Sharkord

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

SettingValue
Redirect URIhttps://your-domain.com/oidc/callback
Grant typeAuthorization code with PKCE (S256)
Scopesopenid profile email
Client authclient_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=false
  • issuer must be HTTPS except on localhost. Endpoints are discovered from <issuer>/.well-known/openid-configuration and cached for 5 minutes.
  • redirectUri empty means it is built from the request, using X-Forwarded-Proto and X-Forwarded-Host from 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:

  1. An existing local account with the same email is linked, only if email_verified is true.
  2. If that email is already linked to another provider account, sign-in is refused.
  3. Otherwise a new account is created, named from preferred_username, name, then sub. The picture claim 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.

Keep a way back in

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.

On this page