onefold documentation
Documentation for onefold: one auth and account system for every product you build. Add sign-in, manage users and sessions, and keep one account per person.
onefold is an auth and account system you connect your products to. It runs sign-in, sign-up, recovery, second factors and consent in one place, and every application you register uses the same pool of accounts. A person signs up once and uses that one account in each of your products.
Your application sends a person to onefold to sign in and receives a verified result back through OAuth 2.0 and OpenID Connect. You never handle a password.
How it fits together
Application A ──┐
Application B ──┼──▶ onefold
Application C ──┘- You register an application for each product you build.
- Each application sends people to onefold to sign in or sign up.
- The person signs in with their one account and approves your application. That approval is a grant.
- Your application receives tokens, identifies the person by
sub, and starts its own session.
The accounts are shared, not copied. An application does not have its own separate set of users, and it can read only the people who have authorized it. See One pool of accounts.
The model
A person has one account on onefold, whichever application they came through. Your application never receives a copy of that account. It receives a grant: the person's approval for your application to read specific things about them.
| Term | What it is |
|---|---|
| Account | One person on onefold. Identified to you by sub, a string that never changes. |
| Application | Your registration: a client ID, redirect URIs, and the scopes you may request. |
| Organization | A group of developers who own and manage applications together. |
| Grant | One person's approval of one application, for a set of scopes. |
| Scope | A named permission, such as identity, that decides which claims you can read. |
| ID token | A signed statement of who signed in. You verify it. |
| Access token | The credential you send to onefold to read the person's claims. |
| Refresh token | The credential you exchange for a new access token without a new sign-in. |
onefold runs sign-in, sign-up, recovery, second factors and consent. Your application keeps
its own session, its own database, its own permissions and its own data about each user, keyed
on sub. Accounts, applications and grants
defines each term in full.
Where to go next
| You want to | Read |
|---|---|
| Register an application and get its credentials | Set up an application |
| Understand the model, tokens and scopes | Accounts, applications and grants, Tokens and sessions, Scopes and claims |
| Follow the sign-in flow request by request | Authorization request and callback |
| Choose how people sign in and what they see | Sign-in methods, Hosted sign-in page, MFA and passkeys |
| Read your users and be told when one authorizes or leaves | Management API, Webhooks, Account lifecycle |
| Follow a framework-specific integration | Next.js, React, Python, Django |
| Prepare for real users | Go-live checklist, Security |
| Let Claude Code, Codex, Cursor or VS Code read this documentation while it writes your integration | MCP overview |
| Look up endpoints, credentials, error codes and webhook events | API overview |
| Fix an integration that fails | Troubleshooting |