palmshed/auth

Authentication for Palmshed projects. A framework-agnostic core, server adapters, storage adapters, a browser client, and a hosted service.

What it is

palmshed/auth provides sign-up, sign-in, session management, password recovery, and role-based access control. The core engine is framework-agnostic. Adapters connect it to servers, databases, and browsers.

Two ways to use it:

Documentation

Getting started
Add authentication to a page or a server in a few minutes.
Configuration
Sessions, rate limits, captcha, and RBAC options.
Client
AuthClient API reference for browsers and Node.
Server
Hono and Express adapters, middleware, and handlers.
Storage
The storage contract and its adapters.
HTTP API
Endpoints, requests, responses, and errors.
Migration
Moving an existing app onto the client and the v1 API.
Deployment
Deploying the hosted service and self-hosting.
Troubleshooting
Common problems and their causes.

Packages

PackagePurpose
@palmshed/auth-coreAuth engine, config, token crypto, rate limiting, captcha
@palmshed/auth-clientBrowser and Node.js client with token refresh
@palmshed/auth-honoHono middleware and route handlers
@palmshed/auth-expressExpress middleware and router
@palmshed/auth-storage-postgresPostgreSQL storage adapter
@palmshed/auth-storage-sqliteSQLite storage adapter
@palmshed/auth-storage-redisRedis rate limiter adapter