Authenticate browser users and project integrations without mixing identity with tenant authorization.
OAO supports three authentication modes behind the same application boundary:
Development auth is the credential-free local default. The console signs
in to the seeded development tenant through an HTTP-only session cookie.
Google IAP verifies the signed assertion injected at the application edge,
then resolves the principal or onboards a human through the application policy.
WorkOS AuthKit is the hosted human-auth adapter. OAO still requires a
matching PostgreSQL principal and project membership; a valid WorkOS identity
alone does not grant tenant access.
Server-to-server integrations use organization-scoped OAO API keys. One key
works against every project of its organization, including projects created
after the key.
Google IAP
IAP and OAO enforce separate gates: IAP decides who may reach the service, then
OAO verifies the signed sub and applies its initial-owner/member policy.
Set AUTH_PROVIDER=iap with the exact Cloud Run resource audience. The default
organization/project are initialized by the app with names defined in code and
IDs stored in PostgreSQL; no tenant or onboarding-domain environment variables
are required.On a fresh installation, the first verified human login becomes owner;
subsequent IAP-authorized humans join as members with explicit developer scopes.
IAP’s human allowlist is the set of possible initial owners—restrict it to
trusted people. Service accounts and API keys cannot claim ownership.The existing login path handles this without a setup screen or separate API.
Membership and audit writes are atomic; concurrent logins produce one owner.
Existing users retain their roles. Restarts and removed owners never reopen the
ownership claim. Removed memberships stay revoked while identity records remain.
See GCP deployment for scope restrictions and rollout.
Organization roles for IAP users
Open Members to manage a signed-in IAP user’s Organization role. The
separate Project role column shows their membership in the selected project.
IAP identity matching uses the immutable Google subject, including older internal
principal aliases. Switching projects requires an identity-linked membership;
unlinked same-name principals cannot retain access after demotion.
Roles shown in the console come from stored memberships, never from a wildcard
scope or a shared display-name fallback.
Owner has full platform access (*). An existing organization Owner can
appoint additional Owners and can change another Owner’s access.
Admin has the explicit current administration permissions, including
provider/MCP configuration, event webhooks, audit access, API-key creation and organization
project management. Owners and Admins can grant other users Admin access.
Admins cannot grant Owner access or change/remove an Owner, and receive no wildcard.
Member retains the automatic developer permissions for agents, skills,
sessions and runs. Viewer has only the explicit read permissions.
Selecting a role updates organization membership, effective scopes, and all
existing IAP project memberships for that person atomically. Use Add member
inside a project to grant an existing verified IAP organization user access to
that project; their project role and scopes inherit their current organization
profile. Refresh the user’s console to display the
new role; subsequent authenticated requests resolve current permissions.
Lowering access revokes API keys created by that person and their derived keys, including keys created
through their other project identities. Rotate any affected integrations before
relying on them again. Remove revokes their organization/project memberships
and their keys while retaining identity records to prevent automatic rejoining.
Also remove their Google IAP access as part of offboarding.You cannot change or remove your own access; the last Owner must remain.
Only IAP-authenticated humans with the required organization role can manage
these grants. API keys cannot grant human access. Users first appear after
signing in through IAP; arbitrary subject/scope entry is disabled in this mode.
Remove from project revokes only the selected project membership and keeps
the organization role, other project memberships, and organization-scoped keys.
The IAP default project’s membership cannot be removed because it anchors
console authentication, and the project itself cannot be deleted. Use
Remove organization access to offboard that user instead.
Remove organization access retains the existing organization-wide offboarding
behavior described above.Existing stored roles are preserved during rollout. If an existing person really
has Owner membership, they will still display as Owner until another Owner
explicitly changes it. This feature does not rewrite existing users or repair
operator-created/shared identity mappings automatically. First-installation
ownership still comes from the first verified human IAP login; project creation
is unchanged and does not promote a member’s organization role. On older
installations where one person has differently named internal records across
projects, create/delete projects from that person’s original project; those
legacy records are not migrated by this change. Their IAP role changes and
revocations still apply across identity-linked project records.The console discovers the configured application provider from
GET /v1/auth/provider. This keeps a promoted container image independent of
the hosted authentication provider.For service-to-service calls through IAP, place the short-lived IAP credential
in Proxy-Authorization and the OAO API key in Authorization. This preserves
edge authentication and OAO authorization as independent checks. Never use a
service-account key.
Create an integration key
A human principal needs both project:admin (or *) and an organization
owner or admin membership to create a key from API keys in the console.
Project membership and wildcard scopes alone do not grant that organization role.
The console label All scopes describes permissions, not organization ownership.Enter a descriptive name, choose its access, select the least-privilege scopes,
and save the secret from the acknowledgement dialog. The console removes the
plaintext when that dialog closes and cannot reveal it later.Access decides where the key works. The console defaults to Only this
project; choose All projects in the organization only for an integration
that must reach every project. See Project keys.API keys are stored per organization. The key list and revocation act on the
same organization-wide pool from any project, except that a project key sees
and revokes only keys of its own project.For automated setup, a caller authenticated with an API key has principal kind
api_key and qualifies through project:admin or *, without an organization
membership check. Callers with principal kind human or the internal service
kind need both organization owner/admin membership and project:admin (or *). Every creator can grant only scopes they already hold; * permits any
scope. Use the project API. In local development, first create a
cookie session and read the seeded project ID:
Add tool_call:claim and tool_call:submit only when the integration executes
caller-owned tools. Add run:cancel only when it should cancel runs.Skill administration requires explicit permissions: skill:read to list and export
packages, skill:write to create drafts and publish versions, skill:bind together
with agent:write to attach versions to agents, and skill:revoke to deprecate or
revoke versions. Delegation inspection uses delegation:read. Messaging requires
both delegation:message and run:create; cancellation requires both
delegation:cancel and run:cancel.
Both the API-key and member permission pickers include these scopes.If a key receives 403 Principal lacks the required scope, inspect
GET /v1/context with that key and compare principal.scopes with the operation’s
requirements. Keys created before these picker options were available keep their
original permissions. Create a replacement with the needed scopes, update the
integration, verify access, then revoke the old key. Selecting all listed scopes
creates an explicit list; it does not grant * or future permissions.If creation returns Organization owner or admin role is required, ask an
organization owner to check your organization membership. A project admin role
or the All scopes label does not satisfy that membership check.MCP administration uses separate least-privilege scopes: mcp:read,
mcp:write, mcp:discover, and mcp:bind. Credential metadata, creation,
rotation, and revocation use credential:read_metadata, credential:write,
credential:rotate, and credential:revoke. A run creator needs mcp:execute
at call time; OAO rechecks this live before decrypting the bound credential.Create and capture the key once. access is project or organization; the
API defaults to organization for compatibility, so pass project for a key
that should stay in this project:
The first successful console or API response contains shown: true and
secret. A replay of the same API request deliberately omits the secret and
returns shown: false. OAO stores a keyed hash, not plaintext, so copy the
secret into your secret manager immediately.Send the key as a bearer credential:
Authorization: Bearer oao_your_secret
Key responses and the key list carry access and projectId (null for an
organization key).
Project keys
A project key works only in the project it was created in. Whatever project
the request path names, the key acts in its own project, so a path naming any
other project returns 403 This credential is restricted to its project.
GET /projects and GET /context list only its project, and
GET /context reports principal.projectRestricted: true.Its scopes still apply inside the project. On top of them, a project key
cannot:
create or delete projects;
download or restore the organization’s configuration backup;
add, change, or remove members;
create, change, or remove anything the organization shares: model, storage,
and sandbox providers, and MCP servers, credentials, and credential
policies. It can still read them, so it can bind them to its project’s
agents and toolsets;
create an organization key. Keys it creates are project keys for the same
project, and it lists and revokes only those.
Deleting a project revokes its project keys.
Cross-project key resolution
An organization API key resolves its organization and scopes from the key
record, then selects the acting project per request: a /v1/projects/{projectId}/... path
picks that project (it must belong to the key’s organization); any other path
falls back to the organization’s earliest-created project. On first use inside
a project, OAO materialises a per-project mirror principal of kind api_key
for the key, so audit entries, idempotency records, and runs always reference
a project-local principal. The same key therefore works in new projects
without any additional setup.Project creation and deletion require an organization owner or admin
membership for human principals. API keys qualify through their scopes: * or
project:admin. For DELETE /v1/projects/{projectId} an API key deliberately
acts from its default (earliest-created) project rather than the addressed
one, so it can delete the project named in the path — except its own acting
project, and no caller can delete the organization’s last project.
Keep OAO API keys on a server. Do not embed them in browser JavaScript, mobile
bundles, repository files, query strings, logs, or SSE URLs.
Write safety
Every project-state mutation requires a caller-generated Idempotency-Key header.
Retry the same logical request with the same key and identical body. Reusing a
key with a different body produces a conflict instead of creating ambiguous
duplicate work.
Keys are scoped to the authenticated principal and route. Keep them opaque,
non-empty, and at most 200 characters.
Browser sessions
The React console uses secure HTTP-only cookies in WorkOS mode. IAP browser
requests are authenticated by the signed edge assertion. Unsafe browser writes
are origin-checked in both modes. API-key clients do not need
the browser cookie or a custom tenant header: the key resolves its organization,
project, principal, and scopes before tenant queries run.The context response keeps the PostgreSQL principal subject as the stable
authorization identity and may add provider-supplied displayName for the UI.
For example, a provisioned WorkOS user can display as Ben Selleslagh while
still authorizing as the existing development-user principal. The display
name does not grant scopes or change tenant membership.The console receives its configured authentication provider at startup. In
WorkOS mode, a missing session goes directly through POST /v1/auth/login and
the HTTPS redirectUrl returned by the API; it does not probe or establish the
development identity. The callback sets the HTTP-only session cookies and
redirects back to the configured app origin. While that navigation is in
progress, concurrent console requests reuse the same login attempt so they
cannot replace its one-time state cookie. If the provider request fails before
navigation starts, the console releases that failed attempt so a later retry can
request a new login without requiring a page reload.When the short-lived access session expires, the console uses
POST /v1/auth/refresh once and retries the interrupted request. Concurrent
requests share that refresh attempt. The refresh credential stays in its own
HTTP-only, strict-same-site cookie, whose lifetime is configured with
WORKOS_COOKIE_MAX_AGE and defaults to 400 days. A rejected refresh starts a
fresh hosted login; a transient provider failure remains retryable without
forcing a logout or requiring a page refresh.In WorkOS mode, the console shows Log out beside the signed-in user. It
posts to POST /v1/auth/logout, which clears OAO’s HTTP-only session and
refresh cookies. When WorkOS returns a hosted logout URL, the console follows
that HTTPS redirect to end the provider session too. Development auth omits the
button because local requests intentionally resolve to the deterministic
development principal without an external session.If a WorkOS browser session is missing, cannot be refreshed, or belongs to a
different configured application origin, the console starts a fresh hosted
sign-in flow instead of leaving the current page in an error state. Recovery is limited to
401 unauthenticated responses and the specific 403 forbidden response
Request origin is not allowed; ordinary authorization failures remain visible
and are not converted into login loops. POST /v1/auth/login accepts this
recovery even when stale cookies are present and still uses only the
server-configured callback and application origin. The successful callback
replaces the stale local session.The callback state is single-use and expires after ten minutes. If a WorkOS
callback is reopened after that state was consumed, arrives without its state
cookie, or contains a mismatched state value, OAO creates a new state cookie and
redirects directly to a fresh hosted login instead of displaying a JSON
Invalid authentication state error. Development-provider callbacks remain
strict and return the explicit 400 response for invalid state.
Manage project members
The console’s Organization and Projects pages read the active tenant
and project directly from the API. The Projects page can create a project
(New project) and delete a non-active project; creation provisions the
creator’s principal, owner membership, identity records, and tenant links in
the new project within one transaction. The console switches its active
project through POST /auth/switch-project: the endpoint verifies that the
signed-in subject has a provisioned principal and membership in the target
project, then sets an oao_active_project cookie. Every later request
re-resolves that principal, so revoked membership or a deleted project falls
back to the session’s own project, and logout clears the cookie. For WorkOS
bearer identities provisioned into several projects, the request’s URL path
selects the project; without one, the earliest-created project is used.The Members page lists project principals with their roles, scopes, and safe
WorkOS display metadata. A project administrator can add an OAO principal,
change another member’s role, or remove another member. The active principal’s
role and removal actions are disabled in the console to prevent accidental
self-lockout.Adding an OAO member is not a WorkOS invitation. For hosted sign-in, first add
the project principal, then run the explicit WorkOS provisioning flow with that
principal’s ID, the existing organization and project IDs, and the verified
WorkOS user and organization IDs.See apps/api/README.md in the repository for the exact WorkOS callback,
webhook, cookie, and local proxy environment variables.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OAO","description":"Build, run, and inspect durable managed agents with OAO.","colors":{"primary":"#3d5bf5","light":"#f7ff00","dark":"#3d5bf5"},"logo":{"light":"https://mintcdn.com/open-agent-orchestrator/k42gavUqUCf8keFP/logo/oao-wordmark-black.png?fit=max\u0026auto=format\u0026n=k42gavUqUCf8keFP\u0026q=85\u0026s=6411d2c5448878c71793c961c38f58c2","dark":"https://mintcdn.com/open-agent-orchestrator/k42gavUqUCf8keFP/logo/oao-wordmark-white.png?fit=max\u0026auto=format\u0026n=k42gavUqUCf8keFP\u0026q=85\u0026s=f1173208049a30a12ef99c669e1d00d5","href":"/"},"favicon":"https://mintcdn.com/open-agent-orchestrator/R1qp5SfgpNOrI4Ap/favicon.svg?fit=max\u0026auto=format\u0026n=R1qp5SfgpNOrI4Ap\u0026q=85\u0026s=67d7ed8e6a2887bfea7c5f6684be6b37","appearance":{"default":"system"},"background":{"color":{"light":"#ffffff","dark":"#111111"}},"footer":{"socials":{}},"fonts":{"heading":{"family":"Space Grotesk"},"body":{"family":"Inter"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"open-agent-orchestrator","hasAudioNarration":false,"actualSubdomain":"open-agent-orchestrator","customDomains":["docs.oao.sh"],"gitSource":{"type":"github","owner":"vectrix-ai","repo":"oao","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{},"buildId":"6b09adc1d9604f95e54c9349","clientVersion":"0.0.4352","searchFilterCounts":[{"language":"default","tag":"Build agents","count":8},{"language":"default","tag":"Reference","count":6},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Connect your app","count":5},{"language":"default","tag":"Overview","count":2},{"language":"default","tag":"Files API","count":1}],"searchSettings":{"showContentSnippets":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* vietnamese */\n@font-face {\n font-family: 'Space Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacemono/v17/i7dPIFZifjKcF5UAWdDRYE58RWq7.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Space Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacemono/v17/i7dPIFZifjKcF5UAWdDRYE98RWq7.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Space Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacemono/v17/i7dPIFZifjKcF5UAWdDRYEF8RQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Space Mono';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacemono/v17/i7dMIFZifjKcF5UAWdDRaPpZUFqaHjyV.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Space Mono';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacemono/v17/i7dMIFZifjKcF5UAWdDRaPpZUFuaHjyV.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Space Mono';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacemono/v17/i7dMIFZifjKcF5UAWdDRaPpZUFWaHg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--font-mono-oao:\n \"Space Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}code,pre,kbd,samp,code span,pre span{font-family:var(--font-mono-oao)}"}]}
{"page":{"pagePath":"reference/authentication","slug":"/reference/authentication","pageMetadata":{"title":"Authentication","description":"Authenticate browser users and project integrations without mixing identity with tenant authorization.","href":"/reference/authentication"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Authenticate browser users and project integrations without mixing identity with tenant authorization.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`OAO supports three authentication modes behind the same application boundary:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Development auth`}),` is the credential-free local default. The console signs\nin to the seeded development tenant through an HTTP-only session cookie.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Google IAP`}),` verifies the signed assertion injected at the application edge,\nthen resolves the principal or onboards a human through the application policy.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`WorkOS AuthKit`}),` is the hosted human-auth adapter. OAO still requires a\nmatching PostgreSQL principal and project membership; a valid WorkOS identity\nalone does not grant tenant access.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Server-to-server integrations use organization-scoped OAO API keys. One key\nworks against every project of its organization, including projects created\nafter the key.`}),`\n`,_jsx(Heading,{level:`2`,id:`google-iap`,children:`Google IAP`}),`\n`,_jsxs(_components.p,{children:[`IAP and OAO enforce separate gates: IAP decides who may reach the service, then\nOAO verifies the signed `,_jsx(_components.code,{children:`sub`}),` and applies its initial-owner/member policy.\nSet `,_jsx(_components.code,{children:`AUTH_PROVIDER=iap`}),` with the exact Cloud Run resource audience. The default\norganization/project are initialized by the app with names defined in code and\nIDs stored in PostgreSQL; no tenant or onboarding-domain environment variables\nare required.`]}),`\n`,_jsx(_components.p,{children:`On a fresh installation, the first verified human login becomes owner;\nsubsequent IAP-authorized humans join as members with explicit developer scopes.\nIAP’s human allowlist is the set of possible initial owners—restrict it to\ntrusted people. Service accounts and API keys cannot claim ownership.`}),`\n`,_jsxs(_components.p,{children:[`The existing login path handles this without a setup screen or separate API.\nMembership and audit writes are atomic; concurrent logins produce one owner.\nExisting users retain their roles. Restarts and removed owners never reopen the\nownership claim. Removed memberships stay revoked while identity records remain.\nSee `,_jsx(_components.a,{href:`/getting-started/gcp`,children:`GCP deployment`}),` for scope restrictions and rollout.`]}),`\n`,_jsx(Heading,{level:`3`,id:`organization-roles-for-iap-users`,children:`Organization roles for IAP users`}),`\n`,_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`Members`}),` to manage a signed-in IAP user’s `,_jsx(_components.strong,{children:`Organization role`}),`. The\nseparate `,_jsx(_components.strong,{children:`Project role`}),` column shows their membership in the selected project.\nIAP identity matching uses the immutable Google subject, including older internal\nprincipal aliases. Switching projects requires an identity-linked membership;\nunlinked same-name principals cannot retain access after demotion.\nRoles shown in the console come from stored memberships, never from a wildcard\nscope or a shared display-name fallback.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Owner`}),` has full platform access (`,_jsx(_components.code,{children:`*`}),`). An existing organization Owner can\nappoint additional Owners and can change another Owner’s access.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Admin`}),` has the explicit current administration permissions, including\nprovider/MCP configuration, event webhooks, audit access, API-key creation and organization\nproject management. Owners and Admins can grant other users Admin access.\nAdmins cannot grant Owner access or change/remove an Owner, and receive no wildcard.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Member`}),` retains the automatic developer permissions for agents, skills,\nsessions and runs. `,_jsx(_components.strong,{children:`Viewer`}),` has only the explicit read permissions.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Selecting a role updates organization membership, effective scopes, and all\nexisting IAP project memberships for that person atomically. Use `,_jsx(_components.strong,{children:`Add member`}),`\ninside a project to grant an existing verified IAP organization user access to\nthat project; their project role and scopes inherit their current organization\nprofile. Refresh the user’s console to display the\nnew role; subsequent authenticated requests resolve current permissions.\nLowering access revokes API keys created by that person and their derived keys, including keys created\nthrough their other project identities. Rotate any affected integrations before\nrelying on them again. `,_jsx(_components.strong,{children:`Remove`}),` revokes their organization/project memberships\nand their keys while retaining identity records to prevent automatic rejoining.\nAlso remove their Google IAP access as part of offboarding.`]}),`\n`,_jsxs(_components.p,{children:[`You cannot change or remove your own access; the last Owner must remain.\nOnly IAP-authenticated humans with the required organization role can manage\nthese grants. API keys cannot grant human access. Users first appear after\nsigning in through IAP; arbitrary subject/scope entry is disabled in this mode.\n`,_jsx(_components.strong,{children:`Remove from project`}),` revokes only the selected project membership and keeps\nthe organization role, other project memberships, and organization-scoped keys.\nThe IAP default project’s membership cannot be removed because it anchors\nconsole authentication, and the project itself cannot be deleted. Use\n`,_jsx(_components.strong,{children:`Remove organization access`}),` to offboard that user instead.\n`,_jsx(_components.strong,{children:`Remove organization access`}),` retains the existing organization-wide offboarding\nbehavior described above.`]}),`\n`,_jsx(_components.p,{children:`Existing stored roles are preserved during rollout. If an existing person really\nhas Owner membership, they will still display as Owner until another Owner\nexplicitly changes it. This feature does not rewrite existing users or repair\noperator-created/shared identity mappings automatically. First-installation\nownership still comes from the first verified human IAP login; project creation\nis unchanged and does not promote a member’s organization role. On older\ninstallations where one person has differently named internal records across\nprojects, create/delete projects from that person’s original project; those\nlegacy records are not migrated by this change. Their IAP role changes and\nrevocations still apply across identity-linked project records.`}),`\n`,_jsxs(_components.p,{children:[`The console discovers the configured application provider from\n`,_jsx(_components.code,{children:`GET /v1/auth/provider`}),`. This keeps a promoted container image independent of\nthe hosted authentication provider.`]}),`\n`,_jsxs(_components.p,{children:[`For service-to-service calls through IAP, place the short-lived IAP credential\nin `,_jsx(_components.code,{children:`Proxy-Authorization`}),` and the OAO API key in `,_jsx(_components.code,{children:`Authorization`}),`. This preserves\nedge authentication and OAO authorization as independent checks. Never use a\nservice-account key.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-an-integration-key`,children:`Create an integration key`}),`\n`,_jsxs(_components.p,{children:[`A human principal needs both `,_jsx(_components.code,{children:`project:admin`}),` (or `,_jsx(_components.code,{children:`*`}),`) and an organization\n`,_jsx(_components.code,{children:`owner`}),` or `,_jsx(_components.code,{children:`admin`}),` membership to create a key from `,_jsx(_components.strong,{children:`API keys`}),` in the console.\nProject membership and wildcard scopes alone do not grant that organization role.\nThe console label `,_jsx(_components.strong,{children:`All scopes`}),` describes permissions, not organization ownership.`]}),`\n`,_jsx(_components.p,{children:`Enter a descriptive name, choose its access, select the least-privilege scopes,\nand save the secret from the acknowledgement dialog. The console removes the\nplaintext when that dialog closes and cannot reveal it later.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Access`}),` decides where the key works. The console defaults to `,_jsx(_components.strong,{children:`Only this\nproject`}),`; choose `,_jsx(_components.strong,{children:`All projects in the organization`}),` only for an integration\nthat must reach every project. See `,_jsx(_components.a,{href:`#project-keys`,children:`Project keys`}),`.`]}),`\n`,_jsx(_components.p,{children:`API keys are stored per organization. The key list and revocation act on the\nsame organization-wide pool from any project, except that a project key sees\nand revokes only keys of its own project.`}),`\n`,_jsxs(_components.p,{children:[`For automated setup, a caller authenticated with an API key has principal kind\n`,_jsx(_components.code,{children:`api_key`}),` and qualifies through `,_jsx(_components.code,{children:`project:admin`}),` or `,_jsx(_components.code,{children:`*`}),`, without an organization\nmembership check. Callers with principal kind `,_jsx(_components.code,{children:`human`}),` or the internal `,_jsx(_components.code,{children:`service`}),`\nkind need both organization owner/admin membership and `,_jsx(_components.code,{children:`project:admin`}),` (or `,_jsx(_components.code,{children:`*`}),`). Every creator can grant only scopes they already hold; `,_jsx(_components.code,{children:`*`}),` permits any\nscope. Use the project API. In local development, first create a\ncookie session and read the seeded project ID:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`API`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`http://127.0.0.1:3000`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ORIGIN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`http://127.0.0.1:8080`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`COOKIE_JAR`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/tmp/oao-docs-cookies.txt`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sS`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COOKIE_JAR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Origin: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ORIGIN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/v1/auth/development/login\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/dev/null`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PROJECT_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sS`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -b`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COOKIE_JAR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/v1/context\" `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '.project.id')\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`For a client that creates and watches sessions, grant only:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`agent:read`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`session:read`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`session:write`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`run:create`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`run:read`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`tool_call:claim`}),` and `,_jsx(_components.code,{children:`tool_call:submit`}),` only when the integration executes\ncaller-owned tools. Add `,_jsx(_components.code,{children:`run:cancel`}),` only when it should cancel runs.`]}),`\n`,_jsxs(_components.p,{children:[`Skill administration requires explicit permissions: `,_jsx(_components.code,{children:`skill:read`}),` to list and export\npackages, `,_jsx(_components.code,{children:`skill:write`}),` to create drafts and publish versions, `,_jsx(_components.code,{children:`skill:bind`}),` together\nwith `,_jsx(_components.code,{children:`agent:write`}),` to attach versions to agents, and `,_jsx(_components.code,{children:`skill:revoke`}),` to deprecate or\nrevoke versions. Delegation inspection uses `,_jsx(_components.code,{children:`delegation:read`}),`. Messaging requires\nboth `,_jsx(_components.code,{children:`delegation:message`}),` and `,_jsx(_components.code,{children:`run:create`}),`; cancellation requires both\n`,_jsx(_components.code,{children:`delegation:cancel`}),` and `,_jsx(_components.code,{children:`run:cancel`}),`.\nBoth the API-key and member permission pickers include these scopes.`]}),`\n`,_jsxs(_components.p,{children:[`If a key receives `,_jsx(_components.code,{children:`403 Principal lacks the required scope`}),`, inspect\n`,_jsx(_components.code,{children:`GET /v1/context`}),` with that key and compare `,_jsx(_components.code,{children:`principal.scopes`}),` with the operation’s\nrequirements. Keys created before these picker options were available keep their\noriginal permissions. Create a replacement with the needed scopes, update the\nintegration, verify access, then revoke the old key. Selecting all listed scopes\ncreates an explicit list; it does not grant `,_jsx(_components.code,{children:`*`}),` or future permissions.`]}),`\n`,_jsxs(_components.p,{children:[`If creation returns `,_jsx(_components.code,{children:`Organization owner or admin role is required`}),`, ask an\norganization owner to check your organization membership. A project admin role\nor the `,_jsx(_components.strong,{children:`All scopes`}),` label does not satisfy that membership check.`]}),`\n`,_jsxs(_components.p,{children:[`MCP administration uses separate least-privilege scopes: `,_jsx(_components.code,{children:`mcp:read`}),`,\n`,_jsx(_components.code,{children:`mcp:write`}),`, `,_jsx(_components.code,{children:`mcp:discover`}),`, and `,_jsx(_components.code,{children:`mcp:bind`}),`. Credential metadata, creation,\nrotation, and revocation use `,_jsx(_components.code,{children:`credential:read_metadata`}),`, `,_jsx(_components.code,{children:`credential:write`}),`,\n`,_jsx(_components.code,{children:`credential:rotate`}),`, and `,_jsx(_components.code,{children:`credential:revoke`}),`. A run creator needs `,_jsx(_components.code,{children:`mcp:execute`}),`\nat call time; OAO rechecks this live before decrypting the bound credential.`]}),`\n`,_jsxs(_components.p,{children:[`Create and capture the key once. `,_jsx(_components.code,{children:`access`}),` is `,_jsx(_components.code,{children:`project`}),` or `,_jsx(_components.code,{children:`organization`}),`; the\nAPI defaults to `,_jsx(_components.code,{children:`organization`}),` for compatibility, so pass `,_jsx(_components.code,{children:`project`}),` for a key\nthat should stay in this project:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sS`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -b`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COOKIE_JAR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Origin: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ORIGIN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Idempotency-Key: create-codebase-integration-key-v1'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/v1/projects/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PROJECT_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api-keys\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Codebase integration\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"access\": \"project\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scopes\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"agent:read\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"session:read\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"session:write\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"run:create\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"run:read\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The first successful console or API response contains `,_jsx(_components.code,{children:`shown: true`}),` and\n`,_jsx(_components.code,{children:`secret`}),`. A replay of the same API request deliberately omits the secret and\nreturns `,_jsx(_components.code,{children:`shown: false`}),`. OAO stores a keyed hash, not plaintext, so copy the\nsecret into your secret manager immediately.`]}),`\n`,_jsx(_components.p,{children:`Send the key as a bearer credential:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer oao_your_secret`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Key responses and the key list carry `,_jsx(_components.code,{children:`access`}),` and `,_jsx(_components.code,{children:`projectId`}),` (`,_jsx(_components.code,{children:`null`}),` for an\norganization key).`]}),`\n`,_jsx(Heading,{level:`2`,id:`project-keys`,children:`Project keys`}),`\n`,_jsxs(_components.p,{children:[`A project key works only in the project it was created in. Whatever project\nthe request path names, the key acts in its own project, so a path naming any\nother project returns `,_jsx(_components.code,{children:`403 This credential is restricted to its project`}),`.\n`,_jsx(_components.code,{children:`GET /projects`}),` and `,_jsx(_components.code,{children:`GET /context`}),` list only its project, and\n`,_jsx(_components.code,{children:`GET /context`}),` reports `,_jsx(_components.code,{children:`principal.projectRestricted: true`}),`.`]}),`\n`,_jsx(_components.p,{children:`Its scopes still apply inside the project. On top of them, a project key\ncannot:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`create or delete projects;`}),`\n`,_jsx(_components.li,{children:`download or restore the organization’s configuration backup;`}),`\n`,_jsx(_components.li,{children:`add, change, or remove members;`}),`\n`,_jsx(_components.li,{children:`create, change, or remove anything the organization shares: model, storage,\nand sandbox providers, and MCP servers, credentials, and credential\npolicies. It can still read them, so it can bind them to its project’s\nagents and toolsets;`}),`\n`,_jsx(_components.li,{children:`create an organization key. Keys it creates are project keys for the same\nproject, and it lists and revokes only those.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Deleting a project revokes its project keys.`}),`\n`,_jsx(Heading,{level:`2`,id:`cross-project-key-resolution`,children:`Cross-project key resolution`}),`\n`,_jsxs(_components.p,{children:[`An organization API key resolves its organization and scopes from the key\nrecord, then selects the acting project per request: a `,_jsx(_components.code,{children:`/v1/projects/{projectId}/...`}),` path\npicks that project (it must belong to the key’s organization); any other path\nfalls back to the organization’s earliest-created project. On first use inside\na project, OAO materialises a per-project mirror principal of kind `,_jsx(_components.code,{children:`api_key`}),`\nfor the key, so audit entries, idempotency records, and runs always reference\na project-local principal. The same key therefore works in new projects\nwithout any additional setup.`]}),`\n`,_jsxs(_components.p,{children:[`Project creation and deletion require an organization `,_jsx(_components.code,{children:`owner`}),` or `,_jsx(_components.code,{children:`admin`}),`\nmembership for human principals. API keys qualify through their scopes: `,_jsx(_components.code,{children:`*`}),` or\n`,_jsx(_components.code,{children:`project:admin`}),`. For `,_jsx(_components.code,{children:`DELETE /v1/projects/{projectId}`}),` an API key deliberately\nacts from its default (earliest-created) project rather than the addressed\none, so it can delete the project named in the path — except its own acting\nproject, and no caller can delete the organization’s last project.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Keep OAO API keys on a server. Do not embed them in browser JavaScript, mobile\nbundles, repository files, query strings, logs, or SSE URLs.`})}),`\n`,_jsx(Heading,{level:`2`,id:`write-safety`,children:`Write safety`}),`\n`,_jsxs(_components.p,{children:[`Every project-state mutation requires a caller-generated `,_jsx(_components.code,{children:`Idempotency-Key`}),` header.\nRetry the same logical request with the same key and identical body. Reusing a\nkey with a different body produces a conflict instead of creating ambiguous\nduplicate work.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Idempotency-Key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 7f44a7de-f878-4c4c-b477-3f680481dc38`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Keys are scoped to the authenticated principal and route. Keep them opaque,\nnon-empty, and at most 200 characters.`}),`\n`,_jsx(Heading,{level:`2`,id:`browser-sessions`,children:`Browser sessions`}),`\n`,_jsx(_components.p,{children:`The React console uses secure HTTP-only cookies in WorkOS mode. IAP browser\nrequests are authenticated by the signed edge assertion. Unsafe browser writes\nare origin-checked in both modes. API-key clients do not need\nthe browser cookie or a custom tenant header: the key resolves its organization,\nproject, principal, and scopes before tenant queries run.`}),`\n`,_jsxs(_components.p,{children:[`The context response keeps the PostgreSQL principal `,_jsx(_components.code,{children:`subject`}),` as the stable\nauthorization identity and may add provider-supplied `,_jsx(_components.code,{children:`displayName`}),` for the UI.\nFor example, a provisioned WorkOS user can display as `,_jsx(_components.code,{children:`Ben Selleslagh`}),` while\nstill authorizing as the existing `,_jsx(_components.code,{children:`development-user`}),` principal. The display\nname does not grant scopes or change tenant membership.`]}),`\n`,_jsxs(_components.p,{children:[`The console receives its configured authentication provider at startup. In\nWorkOS mode, a missing session goes directly through `,_jsx(_components.code,{children:`POST /v1/auth/login`}),` and\nthe HTTPS `,_jsx(_components.code,{children:`redirectUrl`}),` returned by the API; it does not probe or establish the\ndevelopment identity. The callback sets the HTTP-only session cookies and\nredirects back to the configured app origin. While that navigation is in\nprogress, concurrent console requests reuse the same login attempt so they\ncannot replace its one-time state cookie. If the provider request fails before\nnavigation starts, the console releases that failed attempt so a later retry can\nrequest a new login without requiring a page reload.`]}),`\n`,_jsxs(_components.p,{children:[`When the short-lived access session expires, the console uses\n`,_jsx(_components.code,{children:`POST /v1/auth/refresh`}),` once and retries the interrupted request. Concurrent\nrequests share that refresh attempt. The refresh credential stays in its own\nHTTP-only, strict-same-site cookie, whose lifetime is configured with\n`,_jsx(_components.code,{children:`WORKOS_COOKIE_MAX_AGE`}),` and defaults to 400 days. A rejected refresh starts a\nfresh hosted login; a transient provider failure remains retryable without\nforcing a logout or requiring a page refresh.`]}),`\n`,_jsxs(_components.p,{children:[`In WorkOS mode, the console shows `,_jsx(_components.strong,{children:`Log out`}),` beside the signed-in user. It\nposts to `,_jsx(_components.code,{children:`POST /v1/auth/logout`}),`, which clears OAO’s HTTP-only session and\nrefresh cookies. When WorkOS returns a hosted logout URL, the console follows\nthat HTTPS redirect to end the provider session too. Development auth omits the\nbutton because local requests intentionally resolve to the deterministic\ndevelopment principal without an external session.`]}),`\n`,_jsxs(_components.p,{children:[`If a WorkOS browser session is missing, cannot be refreshed, or belongs to a\ndifferent configured application origin, the console starts a fresh hosted\nsign-in flow instead of leaving the current page in an error state. Recovery is limited to\n`,_jsx(_components.code,{children:`401 unauthenticated`}),` responses and the specific `,_jsx(_components.code,{children:`403 forbidden`}),` response\n`,_jsx(_components.code,{children:`Request origin is not allowed`}),`; ordinary authorization failures remain visible\nand are not converted into login loops. `,_jsx(_components.code,{children:`POST /v1/auth/login`}),` accepts this\nrecovery even when stale cookies are present and still uses only the\nserver-configured callback and application origin. The successful callback\nreplaces the stale local session.`]}),`\n`,_jsxs(_components.p,{children:[`The callback state is single-use and expires after ten minutes. If a WorkOS\ncallback is reopened after that state was consumed, arrives without its state\ncookie, or contains a mismatched state value, OAO creates a new state cookie and\nredirects directly to a fresh hosted login instead of displaying a JSON\n`,_jsx(_components.code,{children:`Invalid authentication state`}),` error. Development-provider callbacks remain\nstrict and return the explicit `,_jsx(_components.code,{children:`400`}),` response for invalid state.`]}),`\n`,_jsx(Heading,{level:`2`,id:`manage-project-members`,children:`Manage project members`}),`\n`,_jsxs(_components.p,{children:[`The console’s `,_jsx(_components.strong,{children:`Organization`}),` and `,_jsx(_components.strong,{children:`Projects`}),` pages read the active tenant\nand project directly from the API. The `,_jsx(_components.strong,{children:`Projects`}),` page can create a project\n(`,_jsx(_components.strong,{children:`New project`}),`) and delete a non-active project; creation provisions the\ncreator’s principal, owner membership, identity records, and tenant links in\nthe new project within one transaction. The console switches its active\nproject through `,_jsx(_components.code,{children:`POST /auth/switch-project`}),`: the endpoint verifies that the\nsigned-in subject has a provisioned principal and membership in the target\nproject, then sets an `,_jsx(_components.code,{children:`oao_active_project`}),` cookie. Every later request\nre-resolves that principal, so revoked membership or a deleted project falls\nback to the session’s own project, and logout clears the cookie. For WorkOS\nbearer identities provisioned into several projects, the request’s URL path\nselects the project; without one, the earliest-created project is used.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Members`}),` page lists project principals with their roles, scopes, and safe\nWorkOS display metadata. A project administrator can add an OAO principal,\nchange another member’s role, or remove another member. The active principal’s\nrole and removal actions are disabled in the console to prevent accidental\nself-lockout.`]}),`\n`,_jsx(_components.p,{children:`Adding an OAO member is not a WorkOS invitation. For hosted sign-in, first add\nthe project principal, then run the explicit WorkOS provisioning flow with that\nprincipal’s ID, the existing organization and project IDs, and the verified\nWorkOS user and organization IDs.`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.code,{children:`apps/api/README.md`}),` in the repository for the exact WorkOS callback,\nwebhook, cookie, and local proxy environment variables.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Authentication","description":"Authenticate browser users and project integrations without mixing identity with tenant authorization.","href":"/reference/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Google IAP","slug":"google-iap","depth":2,"children":[{"title":"Organization roles for IAP users","slug":"organization-roles-for-iap-users","depth":3,"children":[]}]},{"title":"Create an integration key","slug":"create-an-integration-key","depth":2,"children":[]},{"title":"Project keys","slug":"project-keys","depth":2,"children":[]},{"title":"Cross-project key resolution","slug":"cross-project-key-resolution","depth":2,"children":[]},{"title":"Write safety","slug":"write-safety","depth":2,"children":[]},{"title":"Browser sessions","slug":"browser-sessions","depth":2,"children":[]},{"title":"Manage project members","slug":"manage-project-members","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"open-agent-orchestrator","siteName":"OAO","title":"Authentication - OAO","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-01T20:55:09.740Z","originalFileLocation":"reference/authentication.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Authenticate browser users and project integrations without mixing identity with tenant authorization.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OAO\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - OAO\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate browser users and project integrations without mixing identity with tenant authorization.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OAO\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.oao.sh/reference/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://open-agent-orchestrator.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=Authentication\u0026amp;description=Authenticate+browser+users+and+project+integrations+without+mixing+identity+with+tenant+authorization.\u0026amp;theme=7d0a9fbde0b0ff054ded6ddd\u0026amp;signature=801c8872bbaa9091421ab65b84f86a0ab7ae4b1b1c3b69b1a98a97e2881d43ce\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Authentication - OAO\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate browser users and project integrations without mixing identity with tenant authorization.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://open-agent-orchestrator.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=Authentication\u0026amp;description=Authenticate+browser+users+and+project+integrations+without+mixing+identity+with+tenant+authorization.\u0026amp;theme=7d0a9fbde0b0ff054ded6ddd\u0026amp;signature=801c8872bbaa9091421ab65b84f86a0ab7ae4b1b1c3b69b1a98a97e2881d43ce\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/open-agent-orchestrator/YXY8WZJrElcNAoiz/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OAO\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3d5bf5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.oao.sh/reference/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.oao.sh/#organization\",\"name\":\"OAO\",\"url\":\"https://docs.oao.sh\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/open-agent-orchestrator/k42gavUqUCf8keFP/logo/oao-wordmark-black.png?fit=max\u0026auto=format\u0026n=k42gavUqUCf8keFP\u0026q=85\u0026s=6411d2c5448878c71793c961c38f58c2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.oao.sh#website\",\"name\":\"OAO\",\"url\":\"https://docs.oao.sh\",\"publisher\":{\"@id\":\"https://docs.oao.sh/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.oao.sh/reference/authentication#webpage\",\"url\":\"https://docs.oao.sh/reference/authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate browser users and project integrations without mixing identity with tenant authorization.\",\"dateModified\":\"2026-11-01T20:55:09.740Z\",\"isPartOf\":{\"@id\":\"https://docs.oao.sh#website\"},\"breadcrumb\":{\"@id\":\"https://docs.oao.sh/reference/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.oao.sh/reference/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"OAO\",\"item\":\"https://docs.oao.sh\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.oao.sh/reference/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.oao.sh/reference/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate browser users and project integrations without mixing identity with tenant authorization.\",\"url\":\"https://docs.oao.sh/reference/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.oao.sh/reference/authentication#webpage\"},\"dateModified\":\"2026-11-01T20:55:09.740Z\",\"publisher\":{\"@id\":\"https://docs.oao.sh/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.oao.sh#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OAO\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OAO\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/reference/authentication.md","siteName":"OAO","nav":{"global":null,"groups":[{"group":"Overview","pages":[{"title":"OAO documentation","href":"/index"},{"title":"How OAO works","href":"/concepts/how-oao-works"}]},{"group":"Get started","pages":[{"title":"Guided quickstart","href":"/getting-started/quickstart"},{"title":"Local development","href":"/getting-started/local-development"},{"title":"Deploy to Railway","href":"/getting-started/railway"},{"title":"Deploy to Google Cloud","href":"/getting-started/gcp"},{"title":"Back up and restore configuration","href":"/getting-started/backup-and-restore"}]},{"group":"Build agents","pages":[{"title":"Create an agent","href":"/agents/create-agent"},{"title":"Add tools to an agent","href":"/agents/add-tools"},{"title":"Harness Operations","href":"/concepts/harness-operations"},{"title":"Multi-agent orchestration","href":"/concepts/multi-agent-orchestration"},{"title":"Versioned Skills","href":"/concepts/skills"},{"title":"Adding models and providers","href":"/models/adding-models"},{"title":"Daytona sandboxes","href":"/sandboxes/daytona"},{"title":"Workspace backups","href":"/storage/workspace-backups"}]},{"group":"Connect your app","pages":[{"title":"Send files to an agent","href":"/integrations/files"},{"title":"Connect a codebase","href":"/integrations/codebase"},{"title":"Event webhooks","href":"/integrations/event-webhooks"},{"title":"Remote MCP servers","href":"/integrations/mcp"},{"title":"Manage OAO through MCP","href":"/integrations/oao-mcp-server"}]},{"group":"Files API","pages":[{"title":"Files API","description":"List and download files from a session's latest persistent workspace backup.","href":"/reference/files-api"}]},{"group":"Reference","pages":[{"title":"Authentication","href":"/reference/authentication"},{"title":"HTTP API","description":"Use the project and organization endpoints, pagination, idempotency, and error contracts.","href":"/reference/http-api"},{"title":"Real-time events","href":"/reference/events"},{"title":"Releases","href":"/reference/releases"},{"title":"MVP limitations","href":"/reference/mvp-limitations"},{"title":"Architecture","href":"/architecture"}]}]},"basePath":"","title":"Authentication - OAO","deploymentId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","buildId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","dynamics":[],"chunks":[]}