Skip to content

triauth for Open WebUIOIDC

Let your team open Open WebUI with one approval on their own device, and no Open WebUI passwords.

  • AI
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every Open WebUI installation
Set up in
Environment variables

About Open WebUI

Open WebUI is a chat interface for AI models that a team hosts on its own server instead of using a public chatbot. It connects to local models or to OpenAI-style services, and gives each person an account, their chat history, document uploads, and shared models.

Connect Open WebUI to triauth

Open WebUI signs people in through the triauth OpenID Connect bridge. Once connected, the sign-in page shows a button with your domain's name. People on your team click it, type their username, and approve on their own device. Nobody keeps an Open WebUI password, and when someone leaves, removing their identity records at your domain ends their access to Open WebUI as well.

How it works

  1. Open oidc.triauth.org and enter your domain. Paste Open WebUI's redirect address, https://ai.example.com/oauth/oidc/callback with your own Open WebUI address in place of ai.example.com, and click Connect app. The bridge gives you a client ID and a client secret.

  2. Add the settings below to the environment of Open WebUI, for example in its docker-compose.yaml, and restart it. Replace example.com with your domain and the two placeholders with the client ID and the client secret from the bridge.

    yaml
    ENABLE_OAUTH_SIGNUP: "true"
    OAUTH_CLIENT_ID: <client ID from the bridge>
    OAUTH_CLIENT_SECRET: <client secret from the bridge>
    OPENID_PROVIDER_URL: https://oidc.triauth.org/example.com/.well-known/openid-configuration
    OAUTH_PROVIDER_NAME: example.com
    OAUTH_SCOPES: openid email profile groups offline_access
  3. Open the sign-in page and click the button with your domain's name.

Checkpoint

Open WebUI's sign-in page shows a new button with your domain's name. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.

Good to know

  • Everyone with an identity at your domain gets an Open WebUI account the first time they sign in. New accounts wait as pending until an administrator activates them, unless the default role is changed to user. To let only one team in, limit the app to a group when you connect it.
  • With group management turned on, Open WebUI fills its groups from the groups published at your domain at every sign-in.
  • Open WebUI takes one OpenID Connect provider per installation.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-open-webui>/oauth/oidc/callback
Where in Open WebUIenvironment variables. The Admin Panel shows them read-only unless ENABLE_OAUTH_PERSISTENT_CONFIG is set
Discovery URLOPENID_PROVIDER_URL takes the full address, https://oidc.triauth.org/<your domain>/.well-known/openid-configuration
New accountsDEFAULT_USER_ROLE=user lets new people in without activation. OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true connects existing accounts by email address
GroupsENABLE_OAUTH_GROUP_MANAGEMENT=true, with ENABLE_OAUTH_GROUP_CREATION=true to create missing groups
Tokensoffline_access in the scopes lets Open WebUI renew the bridge's token. Features that pass that token on to other services need this, such as OAuth-protected model connections, MCP tool servers, and OneDrive. Chat itself never depends on it. A failed renewal only switches those features off until the next sign-in
Several instancesOAUTH_SESSION_TOKEN_ENCRYPTION_KEY must be the same on every instance, since the stored tokens are encrypted with it. ENABLE_OAUTH_ID_TOKEN_COOKIE=false keeps the short-lived ID token out of a browser cookie, as Open WebUI's docs recommend
Without a secretif you ticked This app can't keep a secret on the bridge, set OAUTH_CODE_CHALLENGE_METHOD=S256 and OAUTH_TOKEN_ENDPOINT_AUTH_METHOD=none. The bridge then does not renew the sign-in

Open WebUI keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. Open WebUI's SSO guide explains every variable.

Next steps

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.