Skip to content

triauth for CoderOIDC

Let your developers open their Coder workspaces with one approval on their own device, and no Coder passwords.

  • Code and DevOps
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every edition, self-hosted
Set up in
Environment variables

About Coder

Coder gives developers ready-made development environments, called workspaces, that run on your own servers or cloud account instead of on laptops. Platform teams use it so that everyone, and the coding agents they run, works in a controlled environment that IT can secure and audit.

Connect Coder to triauth

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

How it works

  1. Open oidc.triauth.org and enter your domain. Paste Coder's redirect address, https://coder.example.com/api/v2/users/oidc/callback with your own Coder address in place of coder.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 the Coder server and restart it. Replace example.com with your domain and the two placeholders with the client ID and the client secret from the bridge.

    ini
    CODER_OIDC_ISSUER_URL=https://oidc.triauth.org/example.com
    CODER_OIDC_CLIENT_ID=<client ID from the bridge>
    CODER_OIDC_CLIENT_SECRET=<client secret from the bridge>
    CODER_OIDC_SCOPES=openid,profile,email,offline_access
    CODER_OIDC_EMAIL_DOMAIN=example.com
    CODER_OIDC_SIGN_IN_TEXT=example.com
  3. Open Coder's sign-in page and click the button with your domain's name.

Checkpoint

Coder's sign-in page shows a 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 a Coder account the first time they sign in, named after their username, such as john. To let only one team in, limit the app to a group when you connect it.
  • Coder renews the sign-in through the bridge while a person works, so a session follows the identity. When someone's records at your domain go away, the next renewal fails and Coder signs them out. Coder's own session usually ends after a day without activity.
  • Giving people Coder groups and roles from the groups published at your domain is part of Coder's paid plans. On the free edition, roles are set in Coder.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-coder>/api/v2/users/oidc/callback, built from Coder's access URL
Where in Coderenvironment variables or flags of coder server, for example in the Helm values or the systemd environment file
IssuerCODER_OIDC_ISSUER_URL takes https://oidc.triauth.org/<your domain>, and the rest comes from the discovery document
Scopescomma-separated, with offline_access. Coder's docs say that without refresh tokens "users will be automatically logged out when their access token expires". CODER_OIDC_AUTH_URL_PARAMS stays at its default. People who signed in before offline_access was added need to sign out and in once
Usernamesfrom preferred_username, the person's username. Coder usually allows letters, digits, and hyphens, up to 32 characters, and drops dots from the name. A name already taken gets a random suffix
Existing accountsa person who already signs in to Coder with a password is not connected to the new sign-in by email address. Coder lets them convert the account to OpenID Connect in their account settings
Groups and rolesCODER_OIDC_GROUP_FIELD=groups and the role settings need Coder's paid plans

Coder keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. Coder's OIDC authentication guide explains every variable, and its refresh tokens page covers the session renewal.

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.