Skip to documentation
OmniDocs

Authentication

How AI apps sign in to Omni with OAuth 2.1, the discovery URLs, client registration, tokens and API keys.

Omni's MCP server, https://agent.omnistatic.com/mcp, accepts two kinds of credential, both sent as Authorization: Bearer …:

  • OAuth 2.1 access tokens, which AI apps get by signing you in. This is what Claude, ChatGPT, Codex and Claude Code do for you.
  • API keys (omni_dev_…), made on your dashboard, for scripts and clients without sign-in (API keys).

It never accepts a cookie, and it never accepts your Omni sign-in (Firebase) token directly.

You don't need this page to connect

Every app in Connect your AI handles sign-in by itself. This page is for people building or debugging an MCP client.

Discovery

A request without a token answers 401 with a pointer to the protected resource metadata:

WWW-Authenticate: Bearer resource_metadata="https://agent.omnistatic.com/.well-known/oauth-protected-resource/mcp", scope="spaces"
DocumentURL
Protected resource metadata (RFC 9728)https://agent.omnistatic.com/.well-known/oauth-protected-resource/mcp (also without /mcp)
Authorization server metadata (RFC 8414)https://agent.omnistatic.com/.well-known/oauth-authorization-server

The authorization server metadata today:

FieldValue
issuerhttps://agent.omnistatic.com
authorization_endpointhttps://agent.omnistatic.com/oauth/authorize
token_endpointhttps://agent.omnistatic.com/oauth/token
registration_endpointhttps://agent.omnistatic.com/oauth/register
revocation_endpointhttps://agent.omnistatic.com/oauth/revoke
scopes_supportedspaces, offline_access
grant_types_supportedauthorization_code, refresh_token
code_challenge_methods_supportedS256
token_endpoint_auth_methods_supportednone, client_secret_post, client_secret_basic
client_id_metadata_document_supportedtrue
authorization_response_iss_parameter_supportedtrue

Registering a client

Use either:

  • A client ID metadata document (CIMD): use an https URL that serves your client's metadata as the client_id. Omni fetches it over HTTPS (up to 16 KB) and caches it for an hour. This is what the current MCP specification recommends.
  • Dynamic client registration (RFC 7591): POST /oauth/register with 1 to 10 redirect_uris. Public clients use token_endpoint_auth_method: "none"; confidential clients get a client_secret (omni_cs_…) for client_secret_post or client_secret_basic.

Redirect URIs must be https, a loopback http address (any port, RFC 8252) or a private-use reverse-domain scheme, with no fragment, and must match exactly what was registered. An unregistered redirect URI gets an error page, never a redirect.

The sign-in

  1. The app sends you to /oauth/authorize with PKCE (S256 only), state, and resource=https://agent.omnistatic.com/mcp (RFC 8707).
  2. Omni sends you to https://dash.omni.channel/connect, where you sign in and allow the app to use your Personal memory. If your account isn't set up yet, the page waits until it is: no code is issued before then.
  3. Omni redirects back to the app with a code and iss (RFC 9207).
  4. The app exchanges the code and its PKCE verifier at /oauth/token.
CredentialPrefixLifetime
Authorization codeomni_ac_5 minutes, single use
Access tokenomni_at_1 hour
Refresh tokenomni_rt_30 days, rotated on every use
API keyomni_dev_until you revoke it

No credential (code or API key) is issued until your account is set up, so everything an app saves has a home. Every credential is random, shown once and stored only as a hash. A refresh token used twice revokes its whole chain, and a code replayed revokes what it gave. Apps can revoke tokens at /oauth/revoke, and you can revoke a connection on the dashboard.

Browsers

/mcp and the OAuth endpoints accept requests from servers and native apps (no Origin header) and from the web origins of the AI apps Omni supports. A request from any other web page is refused with 403.