Skip to main content
Login in TrueForge is optional. Run it without auth for personal, local use, or connect an OIDC identity provider (Okta, Microsoft Entra ID, or any standard OIDC IdP) so your team signs in and Settings stay admin-only.

Choose your mode

Standalone / local mode ignores OIDC even if the variables are set. OIDC login applies to hosted deployments (Docker Compose, Helm, or Railway). Local mode is intended for personal use on your own machine — it is not a production or internet-facing setup. Please keep it on localhost; we cannot take responsibility for data loss or unauthorized access if it is used beyond that.

Option A — leave login off

The default. Do not set any OIDC_* variables, run TrueForge as usual (Quickstart), and open the UI — there is no login screen, and Settings and chat are available immediately.
Use this only on localhost or behind network controls you trust. On a public host, anyone who can reach the server gets full admin access under one shared identity. The Helm chart defaults to this mode (configs.oidc.enabled: false) plus a well-known bundled Postgres password and Redis without auth — see the chart README before exposing a release.

Option B — enable OIDC login

1

Register an app with your identity provider

Create a confidential (Web) OIDC application. Whatever the provider, you need:
  • Grant type Authorization Code (PKCE is also used)
  • Redirect URI: https://<trueforge-url>/api/v1/auth/callback, where <trueforge-url> is the public address of your TrueForge instance (the same value you set as PUBLIC_BASE_URL)
  • The users or groups allowed to sign in
  • An ID token claim carrying group/role membership, so TrueForge can tell admins from users
Public / SPA clients are not supported — TrueForge authenticates to the token endpoint with a client secret, so a SPA app fails token exchange with an invalid client secret error.
TrueForge speaks standard OIDC, so any IdP that issues ID tokens works. Pick your provider for exact steps:
1. Create the application
  1. Applications → Create App IntegrationOIDCWeb Application.
  2. Grant type: Authorization Code.
  3. Sign-in redirect URI: https://<trueforge-url>/api/v1/auth/callback.
  4. Assign the users or groups who should sign in.
  5. Copy the Client ID and Client secret.
The sign-out redirect URI is unused — logout only clears the local cookie.2. Configure the Authorization ServerPoint OIDC_ISSUER_URL at a custom Authorization Server, usually https://<your-okta-domain>/oauth2/default. On that server:
  • Access Policies — add a rule that includes this Web client, grant type Authorization Code, your users, and the scopes you request (openid, profile, email, and groups if used).
  • Scopes — if you request groups, create a custom scope named groups (it is not built in on custom authorization servers).
  • Claims — add an ID token claim named to match OIDC_USER_ROLE_CLAIM (default groups): Groups value type, filtered as needed, included in the ID token.
3. Example values (group harness-admin → admin role)
Plug these into the environment variables in the next step.
2

Set the server environment

Set all three required OIDC variables together — partial config fails startup — plus the public origin.How you pass these depends on how you run TrueForge:
Add the variables to packages/trueforge/.env (the source Compose reads):
packages/trueforge/.env
Keep OIDC_CLIENT_SECRET in a secret store — never commit it to version control.
3

Sign in and verify roles

  1. Open the UI — you should be redirected to your IdP login.
  2. After login, confirm admins see Settings and non-admins do not.
  3. If someone expected admin but got user, decode their ID token and check the role claim value (exact match, case-sensitive). Sign out and back in after any IdP claim change.

Roles: admin vs user

Each signed-in person maps to exactly one role, decided by the role claim in their ID token.
Two current limitations:
  • Session history is owner-only — admins are not global session superusers today.
  • The Agent Library is shared — agents created by anyone are visible to everyone on the instance.
To call the HTTP API or SDK against a server with login enabled, pass an ID token — see Get a token and connect.

Troubleshooting

Security checklist

  • Store OIDC_CLIENT_SECRET in a secret manager; never commit it.
  • Do not expose a no-OIDC deployment on the public internet.
  • Register the exact callback URL your users hit (scheme + host).