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 anyOIDC_* variables, run TrueForge as usual (Quickstart), and open the UI — there is no login screen, and Settings and chat are available immediately.
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 asPUBLIC_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
- Okta
- Microsoft Entra ID (Azure AD)
1. Create the applicationPlug these into the environment variables in the next step.
- Applications → Create App Integration → OIDC → Web Application.
- Grant type: Authorization Code.
- Sign-in redirect URI:
https://<trueforge-url>/api/v1/auth/callback. - Assign the users or groups who should sign in.
- Copy the Client ID and Client secret.
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, andgroupsif used). - Scopes — if you request
groups, create a custom scope namedgroups(it is not built in on custom authorization servers). - Claims — add an ID token claim named to match
OIDC_USER_ROLE_CLAIM(defaultgroups): Groups value type, filtered as needed, included in the ID token.
harness-admin → admin role)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:
- Docker Compose
- Helm
Add the variables to
packages/trueforge/.env (the source Compose reads):packages/trueforge/.env
3
Sign in and verify roles
- Open the UI — you should be redirected to your IdP login.
- After login, confirm admins see Settings and non-admins do not.
- 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.
Troubleshooting
Security checklist
- Store
OIDC_CLIENT_SECRETin 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).