Skip to content

Authentication via OpenID Connect (OIDC)

This guide explains how to set up authentication via any OpenID Connect compatible provider.

Prerequisites

  1. Access to a valid OpenID Connect provider (e.g. Authentik, Auth0, Keycloak, Okta)
  2. Permissions to register a new application/client on the provider
  3. Your application's domain or public URL for handling authentication callbacks

Environment Variables

dotenv
OIDC_CLIENT_ID=
OIDC_CLIENT_SECRET=
OIDC_DISCOVERY_URI=https://auth.example.com/.well-known/openid-configuration
OIDC_DISPLAY_NAME="OpenID"
VariableDescription
OIDC_CLIENT_IDThe client/application ID from your OIDC provider
OIDC_CLIENT_SECRETThe client secret associated with the OIDC client ID
OIDC_DISCOVERY_URIThe URI pointing to the OIDC discovery document (usually ends in .well-known/openid-configuration)
OIDC_DISPLAY_NAMEThe name shown to users during login (e.g., "Login with OpenID")
Hidden Variables
dotenv
OIDC_SCOPES="openid profile email"
VariableDescription
OIDC_SCOPESSpace-separated list of scopes requested during login

Common Parameter

These values are often required by your OIDC provider.

ParameterValue
Redirect URIhttps://<YOUR-DOMAIN>/api/auth/oidc/callback