Auth
Sign-in and roles, without writing auth.
Add sign-in to your app with passkeys, two-factor codes, or Apple, Google, GitHub, Microsoft and any OpenID Connect provider. Organizations and roles come built in, and they travel in the token your backend already checks.
Sign-in your users expect.
Passkeys, two-factor codes from an authenticator app or by email, and sign-in with Apple, Google, GitHub, Microsoft or any OpenID Connect provider, like Okta or Keycloak. Setup checks your provider credentials as you save them, so a typo shows up before a user does.
Roles your backend can trust.
Each user's organization and role travel in their sign-in token, so your API checks them without a lookup. Every app has its own signing keys.
Move your users over, passwords included.
Bring your users from Auth0 or your own database with the passwords they already have. Nobody has to reset, and nobody notices the move.
Keys for your services and agents, and a log of every change.
Give a backend service or an AI agent its own key, limited to what it needs. Every change lands in an audit log nobody can edit, which you can export or stream to your own system.
How it works
Your first sign-in in three steps.
- Create an app in the console and turn on sign-up.
- Sign a user in from your app with
@productcraft/auth. - Verify the token on your backend and read the user’s organization and role.
import { Auth } from "@productcraft/auth";
const auth = new Auth();
// In your app: sign the user in (no API key needed for this call).
const result = await auth.consumer("acme").signin({
identifier: "ada@example.com",
password: "CorrectHorse42Battery",
});
// On your backend: verify the token against your app's own keys.
if (result.result === "session") {
const claims = await auth.verifyToken(result.access_token, { app: "acme" });
// Their organization and role, read from the token itself:
console.log(claims.org_id, claims.org_role);
}More in the box
Everything else Auth does.
- Sign-in by email link or code People get a link or a 6-digit code by email, no password needed, and new ones get an account the same way. Use the hosted page or two calls. How it works
- Organizations, with invites Each of your customers is an organization inside your app. Invite people by email with the role they will have.
- Your customers’ own API keys Let your customers create keys for their own scripts. A key can never do more than the person who made it.
- AI agents that act for your users Your users connect Claude Code or another AI agent with one command and allow it in their browser. It acts as them, within their role, until they disconnect it. How it works
- Roles and permissions Build roles from permissions such as
invoice.read, and check one with a single call. - Verification and password reset Email verification and reset are ready-made calls. Send the emails through Mail or your own mail server.
- Test mode for CI and agents Test addresses sign in with a fixed code and never get email, so your tests and coding agents can sign in without an inbox. How it works
- Try sign-in Run a real sign-in against your app from the console and see each step pass or fail.
- Signed webhooks Events for sign-ups, sign-ins, role changes and more, with Send test, an event log and replay.
- REST, with a typed SDK Every operation is a plain HTTPS call.
@productcraft/authadds typed methods for Node and TypeScript. - Hosted in the EU Auth runs in Frankfurt with the rest of ProductCraft.
For your AI agents
MCP tools for apps, users, roles and keys, behind the policies you set on each key, so you decide whether an agent may only look at your users or change them too. Read about MCP
Your first sign-in, end to end.
Create an app, sign a user up and verify their token on your backend, step by step.
Coming from Auth0? Read the migration guide