Small surface area
One createAuth call, familiar Express middleware, and TypeScript-first types.
JWTs, refresh rotation, secure cookies, CSRF, and access control for Node.js APIs.
A focused auth layer for teams that want control
Keep identity in your application, use standard JWTs at the edge, and add stronger refresh-token protection when your product needs it.
const auth = createAuth({
accessSecret: process.env.JWT_ACCESS_SECRET!,
refreshSecret: process.env.JWT_REFRESH_SECRET!,
});
app.get("/profile", auth.protect(), (req, res) => {
res.json({ user: req.user });
});zero-auth signs and verifies tokens, but your application owns users, passwords, storage, rate limits, and authorization policy. Start with the quick start, then choose a bearer-token or cookie integration.