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 ──┘
  1. You register an application for each product you build.
  2. Each application sends people to onefold to sign in or sign up.
  3. The person signs in with their one account and approves your application. That approval is a grant.
  4. 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.

TermWhat it is
AccountOne person on onefold. Identified to you by sub, a string that never changes.
ApplicationYour registration: a client ID, redirect URIs, and the scopes you may request.
OrganizationA group of developers who own and manage applications together.
GrantOne person's approval of one application, for a set of scopes.
ScopeA named permission, such as identity, that decides which claims you can read.
ID tokenA signed statement of who signed in. You verify it.
Access tokenThe credential you send to onefold to read the person's claims.
Refresh tokenThe 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 toRead
Register an application and get its credentialsSet up an application
Understand the model, tokens and scopesAccounts, applications and grants, Tokens and sessions, Scopes and claims
Follow the sign-in flow request by requestAuthorization request and callback
Choose how people sign in and what they seeSign-in methods, Hosted sign-in page, MFA and passkeys
Read your users and be told when one authorizes or leavesManagement API, Webhooks, Account lifecycle
Follow a framework-specific integrationNext.js, React, Python, Django
Prepare for real usersGo-live checklist, Security
Let Claude Code, Codex, Cursor or VS Code read this documentation while it writes your integrationMCP overview
Look up endpoints, credentials, error codes and webhook eventsAPI overview
Fix an integration that failsTroubleshooting

On this page