Auth that keeps its own time.
One Worker, your database, every limit enforced by code you own.
- Owned, not rented.
- Built for the edge.
- Security you can read.
Read the docsnpm install @authtempo/core
Start
- Cloudflare Workers on D1
authtempo init my-app --stack workers-d1 - Cloudflare Workers on Postgres through Hyperdrive
authtempo init my-app --stack workers-postgres - Node
authtempo init my-app --stack node - Bun
authtempo init my-app --stack bun - An MCP server on Cloudflare Workers with D1
authtempo init my-app --stack mcp-server
Every piece, drawn to one grid.
- SessionsA session cookie or a bearer token, checked on each request.
- Account settingsSee and end sessions, prove it again, and change the profile.
- PasskeysRegister a passkey, and sign in with a discoverable passkey.
- Email codesA 6 or 8 digit code by mail signs a person in.
- Account deletionDelete the account, with a mailed link when the option is on.
- Multi-sessionThe sessions of several users in one browser, with a switch and a sign-out of one.
- UsernameA public username for each account, with a check that a name is free.
- Magic linksA single-use link by mail opens a session.
- Social sign-inSign in with ten presets, from Google to Facebook, or any OIDC or OAuth 2 provider.
- ID-token sign-inGoogle One Tap and the native Apple sheet, with a nonce of one use and one sign-in per token.
- Passkey sign-upMake an account with a passkey and a name, and no address.
- PasswordsSign-up, sign-in, mail verification, reset, and change with a password.
- Second factorFinish a sign-in with TOTP, a passkey, or an email code.
- Reset by codeA code by mail resets a forgotten password.
- Phone sign-inA sign-in code by SMS through a send-only port, with a daily cap that core counts.
- Anonymous sign-inA session for a guest with no address, kept out of each route that needs a way in.
- Native appsSign in from Expo or Electron through the system browser.
- OrganizationsOrganizations, ranked roles, mailed invitations, and the active organization.
- Dynamic rolesEach organization stores its own roles, with a rank and a set of actions.
- TeamsNamed groups of members inside an organization, with an active team per session.
- API tokensA script or a CLI calls your routes with an API token.
- Session JWTsA short JWT that another server checks against your key set.
- Operator routesRotate the signing key and reseal the app secrets with a hashed operator secret.
- ImpersonationA platform operator acts as a user for support, with a time limit, a mark, and a notice.
- Operator user toolsList, ban, and sign out users, with an audit row for each act.
- SSO overrideThe operator turns the enforce flag of a domain off when the sign-in provider of the domain is down.
- Client registrationAn MCP client registers itself when you turn the option on.
- OAuth providerAgents and MCP clients get access tokens with consent and PKCE.
- Device sign-inA device with no browser gets tokens after the person types a short code on your site.
- Enterprise SSOAn organization proves its email domain by DNS, and its staff sign in through its own OIDC or SAML provider.
- SSO setup linkAn IT admin of an organization sets up SSO and SCIM from one link. The setup link ships with plan 13a.
- SCIM provisioningA directory such as Entra ID or Okta reads the SCIM server of an organization with its own token.
- Passkey related originsUse one passkey on related sites, with the document of WebAuthn Level 3.
- OpenAPI documentAn OpenAPI 3.1 document of the routes, with their schemes and errors.
- Health checkA route that answers ok with no storage read, for the probe of a host.
- Readiness checkA route that answers ready only when the store and its schema answer.
import { createAuth, type MailPort, type StorageAdapter } from "@authtempo/core";
/** The API at https://api.example.com, for a browser app at https://app.example.com. */
export function createApiAuth(deps: { storage: StorageAdapter; mail: MailPort; secret: string }) {
return createAuth({
baseURL: "https://api.example.com",
// The browser lands here after a sign-in. It must be in trustedOrigins too.
appURL: "https://app.example.com",
// A trusted origin gets credentialed CORS, and its POSTs pass the Origin rule.
trustedOrigins: ["https://app.example.com"],
secret: deps.secret,
storage: deps.storage,
mail: deps.mail,
});
}
Try it
- routes
- 224
- vendors in the path
- 0