OIDC Authentication
This guide will help you set up OIDC (OpenID Connect) authentication for your Ctrlplane application. This method can be used with various identity providers.
Prerequisites
- An account with an OIDC-compliant identity provider (e.g. Auth0, Okta, Azure AD)
- An application or client registered with your identity provider
Setup Steps
- Log in to your identity provider’s dashboard.
- Create a new application or client (if you haven’t already).
- Configure the application settings:
- Set the allowed callback URLs to
https://your-domain.com/api/auth/callback/oidc
. - Note down the client ID, client secret, and issuer URL.
- Set the allowed callback URLs to
Configuration
To enable OIDC authentication, you need to set the following environment variables:
AUTH_OIDC_CLIENT_ID
: Your OIDC client IDAUTH_OIDC_CLIENT_SECRET
: Your OIDC client secretAUTH_OIDC_ISSUER
: The issuer URL for your OIDC provider
When these variables are set, OIDC authentication will be automatically enabled, and basic authentication will be disabled unless explicitly enabled.
Usage
Once configured, users will be able to sign in to your Ctrlplane application using the configured OIDC provider. The authentication flow will redirect users to the provider’s login page and then back to your application after successful authentication.
This method allows for seamless integration with various identity providers, giving you flexibility in choosing the authentication system that best fits your organization’s needs.