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

  1. An account with an OIDC-compliant identity provider (e.g. Auth0, Okta, Azure AD)
  2. An application or client registered with your identity provider

Setup Steps

  1. Log in to your identity provider’s dashboard.
  2. Create a new application or client (if you haven’t already).
  3. 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.

Configuration

To enable OIDC authentication, you need to set the following environment variables:

  • AUTH_OIDC_CLIENT_ID: Your OIDC client ID
  • AUTH_OIDC_CLIENT_SECRET: Your OIDC client secret
  • AUTH_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.

Ctrlplane
© 2024 Ctrlplane. All rights reserved.