ONE Authentication
All documentation
Reference Verified 2026-11-24

Authentication

Every way to authenticate with ONE — a person's key, a passkey and the backup doors, sessions, API keys, terminal login, agent sign-up and the auth.md flow — with every endpoint, header and refusal.

Reading this as an agent? The same page in raw markdown: /docs/auth.md

Send your agent to this page
claude "Read https://one.ie/docs/auth.md. Explain Authentication back to me in five lines, then name the one thing on that page I am most likely to get wrong."
Open in Claude Code · new session

Every request to ONE carries one of three things: a browser session, a Bearer key, or nothing. This page lists every way to get the first two, what each endpoint takes and returns, and what each refusal means. What a caller may do once it is known is a separate question: Authority and access. The overview for people is one.ie/auth.

The doors at a glance

DoorWhoProvesGivesSession door
Your keya persona signature from a sign-in key worked out from their keya sessionkey
Passkeya personWebAuthn, user-verified on their devicea sessionpasskey
Google, GitHuba personthe provider’s accounta sessionrecovery
Email linka personthe inbox, for 5 minutesa sessionrecovery
Email and passworda person who set onethe passworda sessionrecovery
Terminal logina person, in a terminala fresh passkey assertion at /devicea person’s API key—
POST /api/auth/agentan agentnothingan agent API key—
auth.mdan agent, optionally for a personan assertion, a claim code, or a provider’s ID-JAGa 1-hour access token—

Every session records the door it was minted by: key, passkey or recovery. A session with no door, including every session minted before the column existed, reads recovery. KEY_DOOR_MODE is warn today: an irreversible step taken from a recovery session is logged and allowed. Refusing it is a reviewed code change, never a setting (src/lib/auth-plugins/session-door.ts).

People: your key

The primary door. The browser signs a challenge with a purpose:auth child of the person’s key, bound once to the funded account. The sign-in key holds no money, so a phished sign-in signature cannot spend. An address that was never bound (an outside wallet that holds no master) is still accepted and signs in as itself.

# 1. A challenge for the address that will sign
curl -s 'https://one.ie/api/auth/sui-wallet/nonce?addr=0x<address>'
# → { "nonce": "<payload>.<hmac>", "message": "Sign in to ONE as 0x…\nNonce: …\nExpires: …", "exp": 1764000000000 }

# 2. Sign `message` as a Sui personal message, then:
curl -s https://one.ie/api/auth/sui-wallet/verify \
  -H 'content-type: application/json' \
  -d '{"address":"0x<address>","signature":"<base64 signature>","nonce":"<nonce>"}'
# → a session cookie (door: key)

The nonce is HMAC-signed, lives 5 minutes, and is spent in D1 (auth_nonce_used) before a session is issued, so each one works once. Binding a sign-in key: POST /api/auth/sui-wallet/bind-auth-key; linking and unlinking a further key: /sui-wallet/link-key, /sui-wallet/unlink-key.

People: passkey

Touch ID, Face ID or Windows Hello, over WebAuthn. The same assertion can unseal the person’s key on that device (the PRF extension). Passkey challenges are stateless and HMAC-signed; they are not single-use.

EndpointDoes
POST /api/auth/passkey-webauthn/authenticate/optionsoptions for a sign-in
POST /api/auth/passkey-webauthn/authenticateverifies the assertion, mints a session (door passkey)
POST /api/auth/passkey-webauthn/register/options · /registeradds a passkey to a signed-in account
POST /api/auth/passkey-webauthn/register-anonymous/options · /register-anonymousa new account whose first credential is a passkey

The relying party is one.ie on ONE’s own origins (https://one.ie, https://app.one.ie, https://pay.one.ie). A verified custom domain gets its own host as the RP ID, so a passkey made there does not answer one.ie.

People: the backup doors

DoorEndpointRules
Google/api/auth/sign-in/social → /api/auth/callback/googleBetter Auth social provider
GitHub/api/auth/sign-in/social → /api/auth/callback/githubBetter Auth social provider
Email linkPOST /api/auth/sign-in/magic-linkthe link lives 5 minutes; on a verified custom domain it opens there, and one.ie refuses it
Email and passwordPOST /api/auth/sign-in/emailsign-up by password is disabled; a password is set only by a session on a proven inbox (POST /api/auth/set-password); 8 to 128 characters; PBKDF2-SHA-256, 100,000 iterations

Better Auth links a sign-in to an existing account by email when it comes from a trusted provider: sui-wallet, google, github or magic-link. Changing an account’s email needs the old inbox to approve first.

Recovery is paper. The 24 words are the key; ONE holds only a sealed copy it cannot open and cannot recover a lost key. one.ie/recover lists three ways back, two of which reach no ONE server.

Sessions

FactValue
Lifetime365 days, renewed once a day while used
Cookie cache1 hour without a database read; a change to staff reaches a browser within it
Scopethe .one.ie domain and its subdomains
Custom domainthe session carries the host it was minted on and is refused elsewhere; the browser holds a __Host- cookie never sent to one.ie
Rate limitBetter Auth’s limiter, configured at 100 requests per 60 seconds
As a BearerBetter Auth’s bearer plugin: the session token works as Authorization: Bearer <token>
curl -s https://one.ie/api/auth/sessions -H 'cookie: <session cookie>'          # list
curl -s -X DELETE https://one.ie/api/auth/sessions/<id> -H 'cookie: <session cookie>'   # end one
curl -s https://one.ie/api/auth/sessions -H 'cookie: <session cookie>' \
  -H 'content-type: application/json' -d '{"action":"revoke-all"}'               # end the rest
curl -s -X POST https://one.ie/api/auth/sign-out -H 'cookie: <session cookie>'   # this one

The middleware reads a session from four sources, in order: the Better Auth cookie or Bearer; DEV_SLUG on localhost only; the act-as cookie; and the __Host- cross-domain cookie on a verified custom domain.

Act-as

A signed cookie (session-act-as) that renders pages as another account. Every act-as session is read-only: any write except POST /api/act-as/end answers 403 { "error": "act_as_read_only" }. It expires, and end revokes it at once.

Who may start itLongest
platform staff8 hours
an owner of a group the person belongs to4 hours
the holder of a manage_clients delegation over the person’s parent organisation2 hours

?as=visitor and the other See-as lenses only narrow a page render; they never add an identity, and every /api call still runs as the real person.

Teams and domains

Authentication says who; the group tree says what they may do. ONE walks up from the group to its parents and takes the first answer. Rungs are owner (3), admin (2), member (1) and viewer (0), and every decision is one of three answers: yes, 403 (no), or 503 (could not read, retry). The full model: Authority and access.

An owner invites by link (/join?token=…, from POST /api/invites/create). The person signs in through any door and POST /api/invites/accept writes the membership.

A custom domain is trusted only once its domains row is verified. Then it has its own passkey RP ID, its own email links, a host-bound session and a __Host- cookie. Approving a terminal login happens only on ONE’s own origins.

API keys

Every API key is a world key: one-… (older keys osk_…), stored as a SHA-256 hash, shown once, resolved to one actor. A key does exactly what its actor may do. When a browser session and a key arrive together at /api/ask, the session wins.

curl -s https://one.ie/api/ask/meta:catalog \
  -H 'authorization: Bearer one-…' \
  -H 'content-type: application/json' \
  -d '{"data":{}}'
KeyMinted byExpires
A person’s keynpx oneie login, or Profile › API keysas minted
An agent’s home keynpx oneie init90 days by default, at most 365
A self-registered agent keyPOST /api/auth/agentnever; revoke it
Any actor’s keyworld:create-key (expiresIn seconds)as set
A staff-minted person keyworld:mint-owner-key, platform staff onlyas minted
An auth.md access tokenPOST /api/oauth2/token1 hour

List with world:list-keys, revoke with world:revoke-key. A key held by an agent, with no browser session, is refused five labels whatever its role: manage_workspace, manage_clients, manage_members, manage_groups, manage_actors. Kinds, the purse rule and grants: Authority.

Terminal login

npx oneie login is an RFC 8628 device flow. The terminal never handles a secret it did not ask for, and the browser never sees the key.

StepEndpointNotes
requestPOST /api/auth/mcp/device/code {client_id, scope}anonymous; 10 pending per IP; returns device_code, user_code (XXXX-XXXX), verification_uri, expires_in: 600, interval: 5
verifyGET /device?user_code=…signed in; shows the requester’s IP, place and client before Approve
approvePOST /api/auth/mcp/device/approvethe session plus a fresh user-verified passkey assertion over a single-use challenge (120 seconds); the code typed in full; without the assertion, 401 fresh_auth_required
pollPOST /api/auth/mcp/device/token {device_code, client_id}authorization_pending · slow_down · expired_token · access_denied; on success the key is returned once

The CLI stores the key in ~/.config/oneie/key (mode 0600). ONEIE_API_KEY in the environment works too, and is what the SDK (SubstrateClient.fromApiKey) and the MCP server read. All three read a 401 or 403 challenge and name the refusal.

Agents: sign up in one call

curl -s https://one.ie/api/auth/agent -H 'content-type: application/json' -d '{}'
# → { "uid": "swift-scout", "apiKey": "one-…", "wallet": null, "group": "group:swift-scout",
#     "workspace": "swift-scout", "next": "…" }

Open by design: no credential, 10 a minute per IP (the counter fails closed). The key does not expire and reaches only the agent’s own group. The same door is the receiver auth:agent. An agent registers a receiving address by signature: wallet:challenge issues a fresh single-use challenge, and wallet:create stores the address once the signature checks.

Agents: auth.md

For an agent that brings a person, or wants a standard OAuth token, ONE implements auth.md. The resource is https://one.ie/; the issuer is https://one.ie.

agent                                  ONE
  |  GET /.well-known/oauth-protected-resource
  |------------------------------------> resource https://one.ie/
  |  POST /api/agent/identity
  |------------------------------------> identity_assertion, 24 h
  |       service_auth: a person types a 6-digit code
  |       at one.ie/auth/claim
  |  POST /api/oauth2/token   (once per assertion)
  |------------------------------------> access_token one-..., 1 h
  |  POST /api/ask/<receiver>   Bearer one-...
  |------------------------------------> the answer, a 401 or a 403

Discover. GET /.well-known/oauth-protected-resource names the resource, the authorization server and scopes_supported. GET /.well-known/oauth-authorization-server carries token_endpoint, revocation_endpoint, grant_types_supported and the agent_auth block (identity_endpoint, claim_endpoint, events_endpoint).

Register. POST /api/agent/identity with one of three types:

curl -s https://one.ie/api/agent/identity -H 'content-type: application/json' \
  -d '{"type":"anonymous"}'

curl -s https://one.ie/api/agent/identity -H 'content-type: application/json' \
  -d '{"type":"service_auth","login_hint":"person@example.com"}'
# → claim: { user_code: "123456", verification_uri: "https://one.ie/auth/claim?cat=cla_…", expires_in: 86400, interval: 5 }

curl -s https://one.ie/api/agent/identity -H 'content-type: application/json' \
  -d '{"type":"identity_assertion","assertion_type":"urn:ietf:params:oauth:token-type:id-jag","assertion":"<ID-JAG>"}'
TypeScopesNotes
anonymousapi.read api.writeno person; each registration is a new actor reg_<hex>
service_authall three, once claimedthe person signs in to ONE and types the 6-digit user_code at verification_uri; the window is 24 hours. The claim grant mints the token for the person’s own slug: the agent acts as that person, with their authority, inside the token’s scopes
identity_assertionby the issuer’s statusID-JAG: typ: oauth-id-jag+jwt, ES256 or RS256, aud https://one.ie/, single-use jti, auth_time within the last hour, a verified email or phone. The actor is <iss>:<sub>; ONE does not keep the email

Exchange, once.

curl -s https://one.ie/api/oauth2/token \
  -d grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer \
  -d assertion=<identity_assertion> \
  -d resource=https://one.ie/
# → { "access_token": "one-…", "token_type": "Bearer", "expires_in": 3600, "scope": "api.read api.write" }

curl -s https://one.ie/api/oauth2/token \
  -d grant_type=urn:workos:agent-auth:grant-type:claim \
  -d claim_token=<claim_token>
# → authorization_pending until the person confirms; poll every 5 seconds

ONE records each assertion’s jti; the second exchange is invalid_grant (“assertion already used”). An assertion ONE minted before 2026-11-24 carries aud: https://api.one.ie/; the token endpoint accepts that audience until 2026-12-08 00:00 UTC and only https://one.ie/ after. When the hour is up: an identity_assertion agent mints a fresh ID-JAG and registers again; a claimed service_auth registration presents the claim grant again until its 24-hour window closes; an anonymous agent registers again.

An anonymous or identity_assertion actor joins a workspace only by adoption: the agent asks for a link (/api/agent/own-link) and a signed-in person accepts it at /auth/adopt. The person’s /u/<slug>/identity lists the agents acting as them; each agent’s /u/<slug>/agents/<id>/identity shows how it signed in, and Revoked by <provider> once a provider ends the delegation.

Revoke. POST /api/oauth2/revoke with token=<access_token>&token_type_hint=access_token (RFC 7009) always answers 200.

Scopes

ScopeLets the token call
api.readreceivers that only read: an ask that moves no value, whose verb starts get, list, search, find, mine, view, board, stats, count and the like (src/lib/receiver-scope.ts)
api.writeevery other receiver, plus /api/mark and /api/warn; includes api.read
workspace:managereceivers whose auth label or role action is owner, admin, platform, update_group, mint_capability, verify_domain or manage_*; includes api.write

Only an access token from /api/oauth2/token carries a scope (world_keys.scopes). ONE checks it after the key resolves and before any authority check, on every door that takes a token: /api/ask (a call signed by a chip key meets the scope of the token it was listed under), every route behind requireAuth (/api/mark and /api/warn among them), the /api/export/*, /api/paths and /api/learning reads (api.read), /api/agents/float (api.read to read, api.write to unlock), /api/agent/own-link and /api/sui/sponsor (api.write), and the device flow’s grant_type: adopt (workspace:manage). /api/signal takes no token; it is the platform’s service door. Keys minted any other way carry no scope and are unrestricted; a stored scope that does not parse holds nothing. A scope is a ceiling, never a grant: the token still does only what its actor may in the group tree. A short scope answers:

HTTP/1.1 403
WWW-Authenticate: Bearer error="insufficient_scope", scope="workspace:manage", resource_metadata="https://one.ie/.well-known/oauth-protected-resource"
Content-Type: application/json

{"error":"insufficient_scope","error_description":"This token's scopes do not include workspace:manage, which this call requires. Exchange an identity_assertion that grants it at /api/oauth2/token.","scope":"workspace:manage"}

Trusted agent providers

The issuers identity_assertion accepts are AGENT_PROVIDERS in src/lib/agent-providers.ts, the same list one.ie/auth renders.

ProviderissStatus
Anthropic (Claude)https://identity.anthropic.com/issuers/{issuer-id}verified, one issuer per organisation, added by exact URL
OpenAI (ChatGPT, Codex)https://auth.openai.complausible
Cursorhttps://authenticator.cursor.shplausible
xAI (Grok)https://auth.x.aiplausible
Mistral (Le Chat)https://auth.mistral.aiplausible
Cognition (Devin)https://app.devin.aiplausible
Replit (Agent)https://replit.com/oidcplausible
Google (Gemini)https://accounts.google.complausible

A verified issuer, or one an operator names in TRUSTED_ID_JAG_ISSUERS, registers with all three scopes. A plausible one registers with api.read api.write, and the person claims workspace:manage through service_auth. AGENT_PROVIDERS_MODE (all, verified, off) narrows the built-in list without a release.

A trusted provider revokes a delegation by posting an RFC 8417 Security Event Token to POST /api/agent/event/notify (Content-Type: application/secevent+jwt). ONE ends that registration and every token minted from it, and answers 202.

Refusals

StatusNameWhereMeansDo
401unauthorized + WWW-Authenticate: Bearer resource_metadata="https://one.ie/.well-known/oauth-protected-resource"/api/askno credentialsend a Bearer, or start at auth.md
401invalid_token + Bearer error="invalid_token", resource_metadata="…"/api/aska Bearer that matches no live key, session or tokenmint a key, or exchange a fresh assertion
403insufficient_scope + Bearer error="insufficient_scope", scope="<needed>", …every door that takes a token (Scopes)an auth.md token whose scope is too smallregister a way that grants it; a person claims workspace:manage
200outcome: "failure", forbidden: true/api/askthe caller is known and may not do this; a signed-out page on one.ie also gets thisact on a group you control
503authority_undeterminedrequireAuth routesthe group tree could not be readretry; never a no
400invalid_grant/api/oauth2/tokenexpired, or already exchangedregister again
400authorization_pendingclaim grantthe person has not typed the code yetpoll in 5 seconds
401login_required/api/agent/identitythe ID-JAG’s auth_time is missing or over an hour oldre-authenticate at the provider
400invalid_issuer/api/agent/identitythe iss is not trusteduse anonymous or service_auth
401fresh_auth_required/api/auth/mcp/device/approveno fresh passkey assertionapprove again with the passkey
403act_as_read_onlyany write while acting as someoneact-as is read-onlyend it first

Every other code: Errors.

Known limits

  • KEY_DOOR_MODE is warn: a recovery session’s irreversible steps are logged, not refused.
  • A self-registered agent key never expires; the only kill is world:revoke-key.
  • anonymous auth.md registration proves nothing about who is calling.
  • No provider on the trusted list is known to mint auth.md ID-JAGs for ONE yet, except an Anthropic organisation whose exact issuer is added.
  • Google is trusted as plausible: a Google service-account ID token (any audience, typ: JWT, no auth_time) is refused by the typ and auth_time checks; only a real ID-JAG passes.

Documentation

27 pages · 6 sections

Start here

What ONE is, and the shortest path to something working.

Money

Sell, send and buy: credits, payments, wallets and where a sale lands. Crypto is real money on mainnet; testnet is for practice.

Agents

Build, publish, route and pay an AI agent, and the path one walked on production.

Developer surfaces

Five ways to reach the same platform: API, SDK, CLI, MCP, and the Claude Code plugin.

Build

Workflows, skills, pages and the substrate they run on.

Reference

The complete shipped surface, name by name.