Skip to content

Single sign-on (OIDC)

Dreeve can let you log in to the admin panel through an OpenID Connect (OIDC) identity provider, such as Authentik, Authelia, Keycloak or Pocket ID.

Single sign-on is optional. The username and password login keeps working next to it.

Create a new OIDC client (sometimes called an application or provider) with these settings:

  • Client type: confidential, with a client secret.
  • Redirect URI: https://dreeve.example.com/admin/login/oidc/callback, with your own domain.
  • Scopes: openid, email and profile.
  • Token endpoint authentication: client_secret_basic.
  • ID token signing: an asymmetric algorithm such as RS256 or ES256. Tokens signed with the client secret (HS256) are not supported.

Create an OAuth2/OpenID Provider and an application that uses it.

  • Set the client type to Confidential and add the redirect URI.
  • Pick a Signing Key. Without one, Authentik signs tokens with the client secret, which Dreeve does not support.
  • The issuer URL is https://authentik.example.com/application/o/<application-slug>/.

Add these variables to your .env file and recreate your containers:

.env
OIDC_ISSUER_URL=https://auth.example.com
OIDC_CLIENT_ID=dreeve
OIDC_CLIENT_SECRET=your-client-secret
# Comma-separated. Each entry is a subject ("sub" claim) or a verified email address.
OIDC_ALLOWED_USERS=[email protected]

Single sign-on is only switched on when all four variables are set. The login page then shows a Sign in with single sign-on button.

Login form with single sign-on

When single sign-on is set up, you can leave ADMIN_PASSWORD_HASH empty to switch off the password login entirely. The allowed IP addresses for the admin panel (ADMIN_ALLOWED_IPS) still apply to single sign-on.