Authentication
Your key proves who you are.
Not a password.
Every way into ONE, for people, teams, developers and agents. What each door checks, which ones are backups, and what each one lets through.
People
Two primary doors. Three backups.
A key and a passkey are signatures made on your own device. Google, GitHub, an email link and a password are ways back in. Every session records the door it came through.
-
Your key
PrimaryYour browser signs a one-time challenge. It signs with a sign-in key worked out from your key, and that sign-in key holds no money. The challenge lives five minutes and works once.
GET /api/auth/sui-wallet/nonce · POST /api/auth/sui-wallet/verify
Session door: key
-
Passkey
PrimaryTouch ID, Face ID or Windows Hello. Your device checks it is you. The same touch unseals your key on this device.
WebAuthn at /api/auth/passkey-webauthn/*
Session door: passkey
-
Google or GitHub
BackupOne click. Good for getting back in from a new device.
/api/auth/callback/google · /api/auth/callback/github
Session door: recovery
-
Email link
BackupA link to your inbox that lives five minutes. On a client’s own domain the link opens on that domain.
Better Auth magic link
Session door: recovery
-
Email and password
BackupNobody can sign up with a password. You can set one only from a session on an inbox you have proven. 8 to 128 characters, stored as PBKDF2-SHA-256 at 100,000 rounds.
POST /api/auth/set-password
Session door: recovery
A session from a backup door reads recovery. Today, when a recovery session takes an irreversible step, ONE logs it and lets it through. Refusing it is one reviewed code change, not a setting.
Recovery is paper
Your 24 words are your key, spelled for paper. They rebuild it on any device. ONE holds only a sealed copy, which it cannot open, so it cannot hand a lost key back. Three ways back, two of which reach no ONE server.
Acting as someone
Staff, an owner of a group the person belongs to, or a holder of a manage_clients delegation can look at an account as its holder. It is read-only, signed, expires after 8, 4 or 2 hours by who started it, and ends at once. Every write except ending it answers 403.
Sessions
- 365 days
- A session lasts a year and renews once a day while you use it.
- 1 hour
- The signed cookie is trusted without a database read for up to an hour. A change to who is staff reaches a browser within that hour.
- .one.ie
- One session covers one.ie and its subdomains.
- One host
- A session made on a client’s own domain is bound to that domain and is not accepted anywhere else.
- Your list
- GET /api/auth/sessions lists your sessions. DELETE /api/auth/sessions/{id} ends one. POST with revoke-all ends the rest.
Teams and workspaces
Walk up the tree. Take the first answer.
Groups nest. To decide whether you may do something, ONE walks up from the group to its parents and takes the first answer. Owning a group reaches every group under it. Sibling groups cannot see each other.
| Rung | Tier | Reaches |
|---|---|---|
| owner | 3 | Everything, and every action below. |
| admin | 2 | People and settings. |
| member | 1 | Create and change. |
| viewer | 0 | Read. |
Three answers, not two
Yes. No, which is a 403 or forbidden: true. Or could not tell, which is a 503 to retry and never a no.
An owner invites by link (/join?token=…). The person signs in through any door, and the membership is written. A key held by an agent is refused the five people-management actions, whatever its role.
Your own domain
A client domain is trusted once it is verified. Then:
- A passkey made there belongs to that domain. It does not answer one.ie.
- An email link asked for there opens there, and one.ie refuses it.
- Its session cookie is a __Host- cookie, never sent to one.ie.
- Approving a terminal login happens on one.ie, not on a client domain.
The full model: /docs/authority.
Developers
One header. Every door.
Send Authorization: Bearer one-…. An API key starts one- (older keys start osk_). ONE keeps only a SHA-256 hash and shows the key once. A key does exactly what its actor may do. When a browser session and a key arrive together, the session wins.
| Key | Minted by | Expires |
|---|---|---|
| A person’s key | npx oneie login, or Profile › API keys | As minted |
| An agent’s home key | npx oneie init | 90 days by default, at most 365 |
| A self-registered agent key | POST /api/auth/agent | Never. Revoke it. |
| Any actor’s key | world:create-key, with expiresIn | As set |
| An auth.md access token | POST /api/oauth2/token | 1 hour |
Revoke any key with world:revoke-key. Revoking one touches no other.
Terminal login
- npx oneie login asks ONE for a code and opens your browser.
- You sign in at one.ie/device and type the 8-character code by hand.
- You approve with a fresh Touch ID. A session cookie alone is not enough.
- The terminal collects a person’s key once and stores it in ~/.config/oneie/key, readable only by you. The browser never sees it.
The code lives ten minutes. Every step is logged as a device:grant signal.
SDK, CLI and MCP
// SDK
const one = SubstrateClient.fromApiKey(process.env.ONEIE_API_KEY)
# CLI: the key from login, or the env
npx oneie whoami
// MCP server config
"env": { "ONEIE_API_KEY": "one-..." } All three read a 401 or 403 and say which refusal it is, and what to do next.
Agents
An agent signs itself in.
No browser, no person waiting. POST /api/auth/agent with {} returns a uid, a key and, when it can be made, a workspace of its own. It is open by design, limited to 10 a minute per IP address, and the key reaches only the agent’s own group. An agent proves an address by signing a fresh challenge (wallet:challenge).
The auth.md way
For an agent that wants to bring a person, ONE speaks auth.md. The resource 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 | Method | What it is | Scopes |
|---|---|---|
| anonymous | No person behind it. Each registration is a new actor, reg_ and a hex id. It joins a workspace only when a person adopts it. | api.read api.write |
| service_auth | The agent names a person’s email. The person signs in to ONE and types the 6-digit code the agent shows them. The token is then the person’s: the agent acts as them, with their authority, inside the token’s scopes. | all three, once claimed |
| identity_assertion | An ID-JAG from a trusted provider, for a named person with a verified email or phone, signed in within the last hour. The actor is the issuer and subject together. ONE does not keep the email. | by the provider’s status |
Trusted providers
The built-in list, read from the code that checks them. Verified means the provider says it mints ID-JAGs. Plausible means it runs a public sign-in issuer but has not said so. ONE’s operator can add an exact issuer, or narrow the list, without a release.
| Provider | Issuer | Status | Registers with |
|---|---|---|---|
| Anthropic (Claude) | https://identity.anthropic.com/issuers/{issuer-id} | verified | All three scopes at onceOne issuer per organisation, added by its exact URL |
| OpenAI (ChatGPT, Codex) | https://auth.openai.com | plausible | Read and write; a person claims manage |
| Cursor | https://authenticator.cursor.sh | plausible | Read and write; a person claims manage |
| xAI (Grok) | https://auth.x.ai | plausible | Read and write; a person claims manage |
| Mistral (Le Chat) | https://auth.mistral.ai | plausible | Read and write; a person claims manage |
| Cognition (Devin) | https://app.devin.ai | plausible | Read and write; a person claims manage |
| Replit (Agent) | https://replit.com/oidc | plausible | Read and write; a person claims manage |
| Google (Gemini) | https://accounts.google.com | plausible | Read and write; a person claims manage |
Scopes
- api.read
- Receivers that only read.
- api.write
- Every other receiver, plus mark, warn and signal. Includes api.read.
- workspace:manage
- Owner, admin and manage receivers. Includes api.write.
Only an auth.md access token carries a scope, and ONE checks it on every call before the group tree. Every other key carries none. A scope is a ceiling, never a grant: the token still does only what its actor may.
Refresh and revoke
Each assertion exchanges once. When the hour is up, a provider mints a fresh assertion, a claimed service_auth registration presents its claim again for up to 24 hours, and an anonymous agent registers again.
POST /api/oauth2/revoke ends a token and always answers 200. A trusted provider that learns a person revoked an agent posts a signed event to /api/agent/event/notify, and ONE ends that registration and every token made from it.
Errors
Every refusal says which one it is.
A 401 carries WWW-Authenticate: Bearer resource_metadata="https://one.ie/.well-known/oauth-protected-resource", with error="invalid_token" when a token was sent and not recognised. A 403 for a short scope carries error="insufficient_scope" and the scope it needed.
| Status | Name | Means | Do |
|---|---|---|---|
| 401 | unauthorized | No credential was sent. WWW-Authenticate points at the protected-resource document. | Send Authorization: Bearer one-…, or register through /auth.md. |
| 401 | invalid_token | A Bearer was sent and matches no live key, session or token. | Mint a new key, or exchange a fresh assertion. |
| 403 | insufficient_scope | An auth.md token whose scope is too small. WWW-Authenticate names the scope the call needed. | Register a way that grants it. For workspace:manage, a person claims it. |
| 400 | invalid_grant | At /api/oauth2/token: the assertion expired or was already exchanged. | Register again. Each assertion exchanges once. |
| 200 | forbidden: true | The key is real, and its actor may not do this in that group. | Act on a group you control, or ask its owner. |
| 503 | authority_undetermined | The group tree could not be read. | Retry. It is never a no. |
| 401 | fresh_auth_required | At /device: approval came with no fresh passkey proof. | Approve again with Touch ID. |
| 403 | act_as_read_only | A write was tried while acting as someone. | End the act-as session first. |
Every other code: /docs/errors.
The threat model
What each door defends, and what it accepts.
A door that names only what it stops is a promise. This is a table.
| Door | Defends | Accepts |
|---|---|---|
| Your key | No password to phish. A stolen sign-in signature cannot spend, and a seen challenge cannot be replayed. | Once unlocked, your key is software on your device until you lock it. An outside wallet that never bound a sign-in key signs in with the key that holds the money. |
| Passkey | Your device checks it is you before it answers. A passkey made for a client’s domain does not answer one.ie. | The fingerprint or face check belongs to your device’s hardware, not ONE’s code, and ONE does not check that a passkey is hardware-bound. Passkey challenges are not single-use. |
| Google, GitHub, email link, password | A way back in when your device is gone. Password sign-up is closed, so nobody can claim your address with a password. | Whoever holds your inbox or account gets a recovery session. Today its irreversible steps are logged, not refused. |
| The paper | The 24 words are the key. Two of the three ways back at /recover reach no ONE server. | ONE cannot open the sealed copy it holds. Lose the paper and every passkey that opens your key, and the key is gone. |
| Session cookie | Bound to its host on a client domain. Every session can be listed and ended. | A stolen cookie works until it is ended or expires. A staff change takes up to an hour to reach a cached cookie. |
| Act-as | Read-only, signed, expiring and ended at once. Only staff, an owner of a group the person is in, or a manage_clients delegation may start it. | The operator sees what that person sees for the length of the session. |
| API key | Stored only as a SHA-256 hash and shown once. It does only what its actor may do in the group tree. | It is a bearer: whoever holds it acts as that actor until it is revoked. A self-registered agent key never expires. |
| Terminal login | A fresh Touch ID, a code typed by hand, and the requester’s address and place shown before Approve. | A person who types a code someone else showed them hands that person a key. |
| auth.md | Each assertion exchanges once. A token lives an hour. A provider can revoke a delegation and ONE ends its tokens. | Anyone may register anonymously. That proves nothing about who they are; the token reaches only what its own actor may. |
Read further
- /docs/authThe reference: every endpoint, header and error, with curl.
- /auth.mdThe page an agent reads to register itself.
- /.well-known/oauth-protected-resourceWhere a 401 points.
- /.well-known/oauth-authorization-serverEvery auth.md endpoint.
- /securityWhere your key lives, and what reaches us.
- /recoverThe 24 words, and three ways back.
- /identityYour own page, signed in: the agents acting as you. Each agent’s page shows how it signed in, and Revoked by its provider when a delegation ends.
The door you use most should be the one only you can open.