An open-source Auth SDK designed for decentralized tenant backends using Cloudflare D1. Version 0.3.1 is the current stable release. It offers multi-tenant RBAC authentication with TypeScript support. Differentiates by targeting Cloudflare Workers and D1 databases, unlike general-purpose auth libraries. Release cadence is rapid as it is in early development.
npm install learn-auth-sdkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes LearnAuth with a Cloudflare D1 database and registers a new user.
Update calls to createAuthClient: pass new LearnAuth(config) instead of inline config.
Use only in Cloudflare Workers or Node.js with a D1-compatible adapter.
Replace 'databaseUrl' with 'database' pointing to a D1Database instance.
Install the package: npm install learn-auth-sdk. Ensure tsconfig.json includes 'node_modules' in 'paths' or use 'moduleResolution': 'node'.
Ensure you import all necessary symbols: import { LearnAuth } from 'learn-auth-sdk' and not a subpath.