Skip to main content

Integrate with ChatGPT

Support level: Community

What is ChatGPT

ChatGPT is OpenAI's conversational AI platform that provides chat-based assistance across the web and desktop applications.

-- https://chatgpt.com

Preparation

The following placeholders are used in this guide:

  • authentik.company is the FQDN of the authentik installation.
info

This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application.

note

ChatGPT only enables the Manage SSO wizard after you verify ownership of your domain in the ChatGPT admin console. Domain verification is outside the scope of this guide.

Configuration methods

You can configure ChatGPT to use either OIDC or SAML; this guide explains both options.

authentik configuration

To support the integration of ChatGPT with authentik, you need to create an application/provider pair in authentik.

Create an application and provider in authentik

  1. Log in to authentik as an administrator and open the authentik Admin interface.

  2. Navigate to Applications > Applications and click Create with Provider to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)

    • Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings.
    • Choose a Provider type: select OAuth2/OpenID Connect as the provider type.
    • Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
      • Note the Client ID, Client Secret, and slug values because they will be required later.
      • Temporarily set a Strict redirect URI to https://temp.temp.
      • Select any available signing key.
    • Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's My applications page.
  3. Click Submit to save the new application and provider.

ChatGPT configuration

  1. Log in to ChatGPT as an administrator and go to the identity page.
  2. Under Identity Management, choose Manage SSO, then select Custom OIDC as the single sign-on method.
  3. Complete the Custom OIDC wizard:
    1. Provide an Identity Provider Name: enter a descriptive name (for example, authentik).
    2. Create an Application: copy the Login redirect URI that ChatGPT displays.
    3. Add Claims: confirm ChatGPT lists the required claims (sub, email, given_name, and family_name). These are provided by authentik's default OIDC property mappings when the email and profile scopes are enabled.
    4. Provide your OIDC Configuration:
      • Client ID: enter the client ID from authentik.
      • Client Secret: enter the client secret from authentik.
      • Discovery endpoint: https://authentik.company/application/o/<application_slug>/.well-known/openid-configuration
    5. Configure Application Link: review the direct sign-in link that ChatGPT generates; share it with users if needed.
    6. Test Single Sign-On: run the built-in test. ChatGPT should redirect you to authentik for authentication and report success.

Reconfigure authentik provider

  1. Log in to authentik as an administrator and open the authentik Admin interface.
  2. Navigate to Applications > Providers and click the Edit icon of the newly created ChatGPT provider.
  3. Under Protocol settings, set the Redirect URIs to the Login redirect URI from ChatGPT.
  4. Click Update.

Configuration verification

To verify that authentik is correctly integrated with ChatGPT, log out, then attempt to log back in by entering your email address under Email address and clicking Continue. You should be redirected to authentik and upon a successful login, redirected back to ChatGPT.

References