> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openhands.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Auth V2 Overview

> Learn how Auth V2 lets Super Admins configure sign-in methods and Git provider integrations from the OpenHands Enterprise UI.

Auth V2 is a new way to manage how users sign in to OpenHands Enterprise and how they connect Git providers. A Super
Admin configures each **auth provider** on the `Auth Providers` page of the
[Super Admin dashboard](https://docs.openhands.dev/enterprise/super-admin.md), instead of through deployment configuration and Keycloak.

## Auth V2 by Install Type

| Install type | Auth V2 status |
| - | - |
| [Docker Compose](https://docs.openhands.dev/enterprise/docker-compose) | Enabled automatically. No migration is needed. |
| [Replicated VM](https://docs.openhands.dev/enterprise/vm-install/generic-vm.md) and [Helm](https://docs.openhands.dev/enterprise/k8s-install/index) | You may need to migrate from Auth V1, which requires Keycloak, to Auth V2, where Keycloak is optional. See [Migrate From V1 to V2](https://docs.openhands.dev/enterprise/auth-v2/migrate-from-v1.md). |

## Your Existing Setup Keeps Working

The upgrade migrations convert your existing authentication configuration into auth providers. You don't need to change
your external configuration, such as your OAuth apps, your callback URLs, or your Keycloak setup, and you don't need to
do anything else to keep your current sign-in methods and Git integrations working.

**If you already set up authentication with Keycloak, no change is required.** The upgrade migrates your settings, and they keep using Keycloak. The only differences are that the settings are stored in the database instead of the environment, and that a Super Admin configures them in the Super Admin dashboard.

For new integrations, connect directly to the provider instead of through Keycloak. Providers you add in Auth V2 connect
directly.

If all goes well, your users won't notice a change. They sign in with the same providers, and OpenHands matches each
existing user to their existing account by email, so conversations and settings carry over.

Enterprise SSO (SAML) from V1 is migrated in releases after 0.112.0, and isn't migrated in earlier releases. See
[Migrate From V1 to V2](https://docs.openhands.dev/enterprise/auth-v2/migrate-from-v1.md) for what is migrated and what to check.

## What Changes

Auth V2 changes how you manage authentication:

* **Configuration moves into the UI**: The environment variables you set during installation, such as OAuth client IDs
  and secrets, are now managed by a Super Admin in the Super Admin dashboard and stored in the database. You can add,
  edit, enable, disable, and delete providers without redeploying.
* **More than one provider of the same type**: You can add several providers of one type, for example more than one
  GitLab instance. Each appears as its own provider in `Settings > Integrations`. Only the integrated password login is
  limited to one.
* **A Git account no longer grants access by itself**: You choose which providers people can sign in with. You can set up
  an identity provider (IdP) using OIDC or SAML in line with your own best practices, and make it the single source of
  truth for who can sign in. See
  [Make Your Identity Provider the Only Way In](https://docs.openhands.dev/enterprise/auth-v2/configure-providers.md#make-your-identity-provider-the-only-way-in).
* **Login and integrations are separate choices**: For each Git provider, choose whether users can also sign in with it.
  Identity providers such as Okta are used only for sign-in.

You can start from a preset for Okta, Google, a generic OIDC or SAML provider, GitHub, GitLab, Bitbucket, Bitbucket Data
Center, Azure DevOps, or Jira Data Center, and add an integrated password login.

## Provider Types

Every auth provider has one of three types:

| Type | Use it for |
| - | - |
| `OAuth` | Any OAuth 2.0 or OpenID Connect (OIDC) provider, including Git providers. |
| `SAML` | A SAML 2.0 identity provider. |
| `Integrated Password` | Email and password login handled by OpenHands, with no external provider. |

## Login and Integrations

An auth provider can be a **login provider**, a **built-in integration**, or both. Its type decides which.

| Provider | Login provider | Built-in integration |
| - | - | - |
| Okta, Google, and generic OAuth or OIDC (provider `Enterprise SSO`) | Yes | No |
| SAML | Yes | No |
| Integrated Password | Yes | No |
| Jira Data Center | Yes | No. The [Jira Data Center integration](https://docs.openhands.dev/enterprise/auth-v2/configure-providers.md#use-jira-data-center-sign-in-with-the-integration) reuses its sign-in. |
| GitHub, GitLab, Bitbucket, Bitbucket Data Center, Forgejo, and Azure DevOps | When `Use as OpenHands Authentication Provider` is on | Yes |

Every enabled Git provider is available to users as an integration. Its `Use as OpenHands Authentication Provider`
setting decides whether it is also a sign-in option:

* **Integration only**: Turn the setting off. Users connect the provider from `Settings > Integrations` after they sign
  in another way.
* **Sign-in and integration**: Turn the setting on. The provider appears as a button on the login screen. Signing in
  with it also connects it as an integration for that user.

To set up providers, see [Configure Auth Providers](https://docs.openhands.dev/enterprise/auth-v2/configure-providers.md).

## Licensing

Adding or enabling a SAML provider or a direct OIDC provider (Okta, Google, or generic OAuth or OIDC) for login requires a
license that includes SSO. Git providers, Jira Data Center, and the integrated password login do not.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.