From b0451448da282559eddba938def7189b81a83bd8 Mon Sep 17 00:00:00 2001 From: GDS K S Date: Thu, 3 Dec 2026 12:29:18 -0600 Subject: [PATCH 1/2] docs: rewrite the README around the published package --- .github/readme/banner-dark.svg | 75 +++++++++ .github/readme/banner-light.svg | 75 +++++++++ .github/readme/glinr-studios-dark.svg | 1 + .github/readme/glinr-studios-light.svg | 1 + .github/readme/icons/agent.svg | 1 + .github/readme/icons/enterprise.svg | 1 + .github/readme/icons/observe.svg | 1 + .github/readme/icons/passkey.svg | 1 + .github/readme/icons/server.svg | 1 + .github/readme/icons/shield.svg | 1 + .github/readme/icons/signin.svg | 1 + .github/readme/icons/storage.svg | 1 + .github/readme/icons/terminal.svg | 1 + .github/readme/switch-go-dark.svg | 6 + .github/readme/switch-go-light.svg | 6 + .github/readme/switch-typescript-dark.svg | 7 + .github/readme/switch-typescript-light.svg | 7 + CONTRIBUTING.md | 10 +- README.md | 179 ++++++++++++++------- SECURITY.md | 20 +-- docs/COMPARISON.md | 60 +++++++ docs/NPM-STATUS.md | 24 +++ docs/llms.txt | 2 +- scripts/generate-llms.mjs | 2 +- 24 files changed, 412 insertions(+), 72 deletions(-) create mode 100644 .github/readme/banner-dark.svg create mode 100644 .github/readme/banner-light.svg create mode 100644 .github/readme/glinr-studios-dark.svg create mode 100644 .github/readme/glinr-studios-light.svg create mode 100644 .github/readme/icons/agent.svg create mode 100644 .github/readme/icons/enterprise.svg create mode 100644 .github/readme/icons/observe.svg create mode 100644 .github/readme/icons/passkey.svg create mode 100644 .github/readme/icons/server.svg create mode 100644 .github/readme/icons/shield.svg create mode 100644 .github/readme/icons/signin.svg create mode 100644 .github/readme/icons/storage.svg create mode 100644 .github/readme/icons/terminal.svg create mode 100644 .github/readme/switch-go-dark.svg create mode 100644 .github/readme/switch-go-light.svg create mode 100644 .github/readme/switch-typescript-dark.svg create mode 100644 .github/readme/switch-typescript-light.svg create mode 100644 docs/COMPARISON.md create mode 100644 docs/NPM-STATUS.md diff --git a/.github/readme/banner-dark.svg b/.github/readme/banner-dark.svg new file mode 100644 index 00000000..8b756afe --- /dev/null +++ b/.github/readme/banner-dark.svg @@ -0,0 +1,75 @@ + +theAuth for TypeScript: auth library for people and AI agents, with scoped permissions, delegation, audit, MCP OAuth 2.1 and passkeys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +theAuth +Auth library +for TypeScript +Agent identity · Delegation · Audit +MCP OAuth 2.1 · Passkeys · SSO + diff --git a/.github/readme/banner-light.svg b/.github/readme/banner-light.svg new file mode 100644 index 00000000..ef69bc1e --- /dev/null +++ b/.github/readme/banner-light.svg @@ -0,0 +1,75 @@ + +theAuth for TypeScript: auth library for people and AI agents, with scoped permissions, delegation, audit, MCP OAuth 2.1 and passkeys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +theAuth +Auth library +for TypeScript +Agent identity · Delegation · Audit +MCP OAuth 2.1 · Passkeys · SSO + diff --git a/.github/readme/glinr-studios-dark.svg b/.github/readme/glinr-studios-dark.svg new file mode 100644 index 00000000..4b5ee2c2 --- /dev/null +++ b/.github/readme/glinr-studios-dark.svg @@ -0,0 +1 @@ +GLINR Studios \ No newline at end of file diff --git a/.github/readme/glinr-studios-light.svg b/.github/readme/glinr-studios-light.svg new file mode 100644 index 00000000..46763a18 --- /dev/null +++ b/.github/readme/glinr-studios-light.svg @@ -0,0 +1 @@ +GLINR Studios \ No newline at end of file diff --git a/.github/readme/icons/agent.svg b/.github/readme/icons/agent.svg new file mode 100644 index 00000000..59c4c868 --- /dev/null +++ b/.github/readme/icons/agent.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/icons/enterprise.svg b/.github/readme/icons/enterprise.svg new file mode 100644 index 00000000..138973ee --- /dev/null +++ b/.github/readme/icons/enterprise.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/icons/observe.svg b/.github/readme/icons/observe.svg new file mode 100644 index 00000000..a51294ad --- /dev/null +++ b/.github/readme/icons/observe.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/icons/passkey.svg b/.github/readme/icons/passkey.svg new file mode 100644 index 00000000..1e0d6265 --- /dev/null +++ b/.github/readme/icons/passkey.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/icons/server.svg b/.github/readme/icons/server.svg new file mode 100644 index 00000000..6de7ad6b --- /dev/null +++ b/.github/readme/icons/server.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/icons/shield.svg b/.github/readme/icons/shield.svg new file mode 100644 index 00000000..c56b85e5 --- /dev/null +++ b/.github/readme/icons/shield.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/icons/signin.svg b/.github/readme/icons/signin.svg new file mode 100644 index 00000000..db351eaa --- /dev/null +++ b/.github/readme/icons/signin.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/icons/storage.svg b/.github/readme/icons/storage.svg new file mode 100644 index 00000000..d3a37c3a --- /dev/null +++ b/.github/readme/icons/storage.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/icons/terminal.svg b/.github/readme/icons/terminal.svg new file mode 100644 index 00000000..20170769 --- /dev/null +++ b/.github/readme/icons/terminal.svg @@ -0,0 +1 @@ + diff --git a/.github/readme/switch-go-dark.svg b/.github/readme/switch-go-dark.svg new file mode 100644 index 00000000..c8ce1492 --- /dev/null +++ b/.github/readme/switch-go-dark.svg @@ -0,0 +1,6 @@ + +theAuth Go library + + +Go + diff --git a/.github/readme/switch-go-light.svg b/.github/readme/switch-go-light.svg new file mode 100644 index 00000000..94079e1c --- /dev/null +++ b/.github/readme/switch-go-light.svg @@ -0,0 +1,6 @@ + +theAuth Go library + + +Go + diff --git a/.github/readme/switch-typescript-dark.svg b/.github/readme/switch-typescript-dark.svg new file mode 100644 index 00000000..f68d9c9d --- /dev/null +++ b/.github/readme/switch-typescript-dark.svg @@ -0,0 +1,7 @@ + +theAuth TypeScript library (current) + + +TypeScript + + diff --git a/.github/readme/switch-typescript-light.svg b/.github/readme/switch-typescript-light.svg new file mode 100644 index 00000000..47cc7d49 --- /dev/null +++ b/.github/readme/switch-typescript-light.svg @@ -0,0 +1,7 @@ + +theAuth TypeScript library (current) + + +TypeScript + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6921e98a..8ec5b3ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ By participating you agree to the [Code of Conduct](CODE_OF_CONDUCT.md). ## Development setup -Prerequisites: Node.js 20+, pnpm 9+. +Prerequisites: Node.js 20+ and pnpm 10 (the version is pinned in `package.json`). ```bash git clone https://github.com/glincker/theauth.git @@ -133,7 +133,7 @@ Bump type guide: ### Peer range policy -Adapters and plugins declare `@glinr/theauth` as a peer dependency with an explicit range (currently `>=0.6.0 <1.0.0`), never `workspace:*`. pnpm rewrites `workspace:*` to the exact core version on publish, so changesets treats every core bump as out of range and cascades a major bump onto every dependent package. Keep the `@glinr/theauth` devDependency as `workspace:*` so local installs still link the workspace copy. Widen the peer range by hand when core ships a release the adapters support (for example, change the upper bound when core reaches 1.0), and give a package a `major` only when its own API breaks. +Adapters and plugins declare `@glinr/theauth` as a peer dependency with an explicit range (see each `package.json`), never `workspace:*`. pnpm rewrites `workspace:*` to the exact core version on publish, so changesets treats every core bump as out of range and cascades a major bump onto every dependent package. Keep the `@glinr/theauth` devDependency as `workspace:*` so local installs still link the workspace copy. Widen the peer range by hand when core ships a release the adapters support, and give a package a `major` only when its own API breaks. For changes that touch multiple packages at once, open a Discussion before bumping so the release graph stays consistent. @@ -141,11 +141,11 @@ For changes that touch multiple packages at once, open a Discussion before bumpi ## Testing -All new features must include tests. Use Vitest. Test files live next to their source: +All new features must include tests. Use Vitest. Core tests live in the package's `tests` directory: ``` -packages/core/src/agent.ts -packages/core/src/agent.test.ts +packages/core/src/agent/ +packages/core/tests/agent.test.ts ``` Run tests for one package: diff --git a/README.md b/README.md index 80d00612..baf1b04c 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,52 @@ -# theAuth +

+ theAuth for TypeScript (this repository) + theAuth for Go +

-Open-source TypeScript auth that gives AI agents their own identity, scoped permissions, delegation and an audit trail, next to normal human sign in. +

+ + + theAuth, a TypeScript auth library for people and AI agents: agent identity, delegation, audit, MCP OAuth 2.1, passkeys and SSO + +

-[![npm](https://img.shields.io/npm/v/@glinr/theauth?style=flat&label=npm)](https://www.npmjs.com/package/@glinr/theauth) -[![CI](https://img.shields.io/github/actions/workflow/status/glincker/theauth/ci.yml?branch=main&style=flat&label=CI)](https://github.com/glincker/theauth/actions/workflows/ci.yml) -[![CodeQL](https://github.com/glincker/theauth/actions/workflows/codeql.yml/badge.svg)](https://github.com/glincker/theauth/actions/workflows/codeql.yml) -[![License](https://img.shields.io/github/license/glincker/theauth?style=flat&label=license)](LICENSE) - -[Website](https://theauth.dev) | [Docs](https://docs.theauth.dev) | [Quickstart](https://docs.theauth.dev/quickstart) | [Playground](https://docs.theauth.dev/playground) | [Examples](examples) | [Go library](https://github.com/glincker/theauth-go) - -## Quickstart +# theAuth: TypeScript auth library -Needs Node 20 or newer. This runs as pasted, with an in-memory SQLite database. +**Self-hosted auth for people and AI agents.** Each agent gets its own token, scoped permissions, delegation and an audit trail, in your app and your database. -The snippet needs 2.0.0, the version in this repo. npm `latest` was 1.2.0 on 2026-10-31, which has no `auth.user`. I ran it against a local build and got the output in the comments, so build `packages/core` until 2.0.0 ships. +[![npm](https://img.shields.io/npm/v/@glinr/theauth?label=npm)](https://www.npmjs.com/package/@glinr/theauth) +[![CI](https://github.com/glincker/theauth/actions/workflows/ci.yml/badge.svg)](https://github.com/glincker/theauth/actions/workflows/ci.yml) +[![CodeQL](https://github.com/glincker/theauth/actions/workflows/codeql.yml/badge.svg)](https://github.com/glincker/theauth/actions/workflows/codeql.yml) +[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/glincker/theauth/badge)](https://scorecard.dev/viewer/?uri=github.com/glincker/theauth) +[![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE) +[![GitHub stars](https://img.shields.io/github/stars/glincker/theauth?style=flat&logo=github)](https://github.com/glincker/theauth/stargazers) ```bash -npm install @glinr/theauth +npm install @glinr/theauth@1.2.0 ``` -```typescript -import { createTheAuth } from "@glinr/theauth"; +[Quickstart](#quickstart) · [Security](SECURITY.md) · [Status](#status) · [Compare](#how-it-compares) · [Docs](https://docs.theauth.dev) + +## Quickstart + +Needs Node 20 or newer. Save as `quickstart.mjs` and run `node quickstart.mjs`. It uses an in-memory SQLite database. + +```javascript +import { createTheAuth, users } from "@glinr/theauth"; const auth = await createTheAuth({ database: { provider: "sqlite", url: ":memory:" }, agents: { enabled: true }, }); -// An agent needs an owner row. Human sign in creates these for you. -const owner = await auth.user.create({ email: "owner@example.com", name: "Owner" }); +// Every agent has a human owner. +const now = new Date(); +await auth.db.insert(users).values({ + id: "user-1", email: "owner@example.com", name: "Owner", createdAt: now, updatedAt: now, +}); const agent = await auth.agent.create({ - ownerId: owner.id, + ownerId: "user-1", name: "github-reader", type: "autonomous", permissions: [{ resource: "mcp:github:*", actions: ["read"] }], @@ -39,49 +54,103 @@ const agent = await auth.agent.create({ const read = await auth.authorize(agent.id, { action: "read", resource: "mcp:github:repos" }); const write = await auth.authorize(agent.id, { action: "write", resource: "mcp:github:repos" }); -console.log(read.allowed, read.code); // true allowed -console.log(write.allowed, write.code); // false no_permission +console.log(read.allowed, write.allowed); // true false +console.log(write.reason); // why it was denied ``` -`agent.token` starts with `ta_` and is shown once. To serve this over HTTP, mount a [framework adapter](https://docs.theauth.dev/packages#framework-adapters). +`agent.token` is returned when the agent is created. Next: the [documentation](https://docs.theauth.dev) and [examples](examples). Both follow this repository, which is ahead of npm (see [Status](#status)). -## Why +## What it solves -Agents are principals with owners, not shared API keys. A parent agent can hand part of its permissions to a child, and revoking any link takes effect on the next call. Every decision returns a machine-readable code and writes an audit row. +| Your problem | What theAuth does | +|---|---| +| Agents share one API key with full access | Gives each agent its own token and a list of allowed actions and resources | +| A sub-agent needs part of its parent's access | Delegates a subset with an expiry; revoking the parent cuts it off | +| You cannot tell what an agent did | Writes an audit row for each authorization, with an optional hash chain | +| Some actions need a person to say yes | A permission can require approval before it passes | +| MCP clients expect OAuth 2.1 | Ships MCP authorization server functions in `@glinr/theauth/mcp` | -It runs on Node, Bun, Deno and Cloudflare Workers with four runtime dependencies in core (`drizzle-orm`, `jose`, `sql.js`, `zod`). No hosted service needed. +## Features -## Status +Everything in this table is exported by `@glinr/theauth` 1.2.0 on npm. -Versions follow [STABILITY.md](STABILITY.md): stable is 1.0 or later, beta is 0.2 to 0.9, experimental is 0.1. +| | Area | What you get | +|:-:|---|---| +| | **Agents** | Agent tokens, rotation, revocation, permissions with constraints, delegation, approvals, budget policies | +| | **Audit** | Query and export, optional tamper-evident chain with verification | +| | **MCP and OAuth** | MCP authorization server, token exchange, DPoP proof checks, client ID metadata documents | +| | **Sign-in** | Magic links, email codes, phone, username and password, 48 OAuth providers and presets | +| | **Passkeys and MFA** | WebAuthn passkeys and TOTP | +| | **Teams and SSO** | Organizations, admin, API keys, OIDC SSO, SCIM, SAML (experimental) | +| | **Storage** | SQLite and Postgres through Drizzle, Cloudflare D1 binding | +| | **Moving in** | User import and lazy password migration in `@glinr/theauth/migrate` | -| Area | Status | Notes | -|---|---|---| -| Core, email, MCP, gateway, CLI, client | Stable | SemVer, breaking changes only in majors. Repo is at core 2.0.0, npm is at 1.2.0 | -| React, Vue, Svelte, Expo, Electron, UI, dashboard, test utils | Beta | May change between minor releases | -| Browser extension package | Experimental | 0.1.0 | -| SAML | Experimental | Our own verifier, no independent audit | -| Cookie session cache | Experimental, opt in | Can lag a revocation by up to its `maxAge` | -| Databases | SQLite tested in CI | Postgres run by hand, D1 untested, MySQL unsupported | - -All 30-odd packages, versions and every known limit: [Packages and status](https://docs.theauth.dev/packages). Not sure it fits? Read [When not to use theAuth](https://docs.theauth.dev/when-not-to-use). - -## Packages - -The full table with versions and maturity lives in [Packages and status](https://docs.theauth.dev/packages). Core is in [`packages/core`](packages/core). - -## Related - -- [theauth-go](https://github.com/glincker/theauth-go): the Go server library (v2), with the same model. It is separate from the Go REST client in [`sdks/go`](sdks/go). -- [Python client](https://pypi.org/project/theauth/) and [Terraform provider](https://registry.terraform.io/providers/glincker/theauth). -- Formerly kavachOS: see the [rename map](RENAME-MAP.md). - -## How this was built - -Parts of this codebase were written with AI assistance. The code is covered by about 5,000 test cases (a textual count, see [by the numbers](https://docs.theauth.dev/packages#by-the-numbers)) plus CodeQL in CI. It has had no third party security audit. If you find a problem, open an issue or report it privately as described in [SECURITY.md](SECURITY.md). - -## Contributing and license - -Questions: [Discussions](https://github.com/glincker/theauth/discussions) or the [GLINR Discord](https://discord.gg/Ar5pcaZB99). See [CONTRIBUTING.md](CONTRIBUTING.md) and [CHANGELOG.md](CHANGELOG.md). +## Status -[MIT](LICENSE). Built by [GLINCKER](https://glincker.com), a [GLINR STUDIOS](https://glinr.com) company. +Checked against the npm registry on 2026-12-03. Details and the full package list: [what npm serves](docs/NPM-STATUS.md). + +| Area | State | +|---|---| +| `@glinr/theauth` | 1.2.0 on npm. This repository is at 2.0.0, which is **not published** | +| Only in the repository | Built-in email and password, `auth.user`, the `@glinr/theauth/http` handler and the other [2.0.0 changes](packages/core/CHANGELOG.md) | +| Framework adapters, email and gateway packages | Published, but they accept core below 1.0. Installing an adapter or the email package together with core makes npm pick core 0.8.0 | +| `@glinr/theauth-cli` | Version 1.2.0 on npm does not install | +| `@glinr/theauth-client`, `@glinr/theauth-mcp` | 1.1.1 on npm, install cleanly | +| SAML | Experimental, no independent audit | +| Databases | SQLite is tested in CI. Postgres is run by hand, D1 is untested, MySQL is not supported ([details](docs/packages.mdx)) | + +Version rules are in [STABILITY.md](STABILITY.md). + +## How it compares + +| | theAuth 1.2.0 | Better Auth | Auth.js | Clerk | Auth0 | +|---|---|---|---|---|---| +| Runs as | Library | Library or self-hosted server | Library | Hosted service | Hosted service | +| Passkeys | Yes | Plugin | Experimental | Paid in production | Yes | +| SAML | Experimental | Plugin | Through BoxyHQ | Paid in production | Yes | +| OAuth server for MCP | Yes | Plugin | | Yes | Yes | +| Agent identity | Yes | Plugin, not yet stable | | Agents act as the user | Early access | +| Hosted dashboard | | Paid add-on | | Yes | Yes | + +A blank cell means we did not verify it. Sources, retrieval dates and when each of the others is the better pick: [docs/COMPARISON.md](docs/COMPARISON.md). Also read [when not to use theAuth](docs/when-not-to-use.mdx). + +## Trust and security + +| Check it yourself | Where | +|---|---| +| Private vulnerability reporting, or support@glinr.com | [Security policy](SECURITY.md) | +| Tests, CodeQL, OSV scan, dependency review, Scorecard | [Workflows](.github/workflows) | +| 581 test files under `packages/` (counted 2026-12-03) | [packages](packages) | +| npm provenance attestation on `@glinr/theauth` 1.2.0 | [npm](https://www.npmjs.com/package/@glinr/theauth/v/1.2.0) | +| MIT license, governance and maintainers | [License](LICENSE), [Governance](GOVERNANCE.md), [Maintainers](MAINTAINERS.md) | + +Know before you adopt: the first commit is dated 2026-03-21 and there has been no third party security audit. + +## Contribute + +- **Star** [glincker/theauth](https://github.com/glincker/theauth) if it is useful to you. +- **Ask or report** in [Discussions](https://github.com/glincker/theauth/discussions), [issues](https://github.com/glincker/theauth/issues) or the [GLINR Discord](https://discord.gg/Ar5pcaZB99). +- **Contribute** with [CONTRIBUTING](CONTRIBUTING.md) and the [code of conduct](CODE_OF_CONDUCT.md). + +Formerly kavachOS: see the [rename map](RENAME-MAP.md). The Go library is [glincker/theauth-go](https://github.com/glincker/theauth-go). + +## Made by + +

Built by GLINCKER, a GLINR STUDIOS company. More from the team:

+ + + + + + + +
+ GLINR Studios
+ Open source from the team behind theAuth +
+
Levelrail

+ Self-hosted deployment platform. Git push, HTTPS, logs, rollback. +
+
theSVG

+ Open SVG brand library with logos, icons and flags. +
diff --git a/SECURITY.md b/SECURITY.md index 17692a75..b7f5ea1f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,18 +2,18 @@ ## Supported Versions -Packages in this repo are versioned independently and are mostly pre-1.0. Security fixes go to the latest release line of each package: +Packages are versioned independently. Security fixes go to the latest release line of each package. [STABILITY.md](STABILITY.md) covers what happens across major versions. The lines below are what npm served on 2026-12-03: -| Package | Supported line | -| ------- | -------------- | -| `@glinr/theauth` (core) | 0.7.x | -| `@glinr/theauth-react` | 0.6.x | -| `@glinr/theauth-client`, `-vue`, `-svelte`, `-expo`, `-electron` | 0.2.x | +| Package | Supported line on npm | +| ------- | --------------------- | +| `@glinr/theauth` (core) | 1.2.x | +| `@glinr/theauth-client`, `-mcp` | 1.1.x | +| `@glinr/theauth-cli` | 1.2.x | | `@glinr/theauth-gateway` | 4.0.x | -| `@glinr/theauth-cli` | 0.3.x | -| `@glinr/theauth-dashboard` | 0.1.x | -| `@glinr/theauth-ui`, `-ui-headless`, `-test-utils` | 0.1.x | -| Older lines | No | +| `@glinr/theauth-react` | 0.7.x | +| `@glinr/theauth-expo` | 0.4.x | +| `@glinr/theauth-vue`, `-svelte`, `-electron`, `-dashboard`, `-ui` | 0.3.x | +| `@glinr/theauth-ui-headless`, `-test-utils` | 0.2.x | ## Reporting a Vulnerability diff --git a/docs/COMPARISON.md b/docs/COMPARISON.md new file mode 100644 index 00000000..d2cfee1f --- /dev/null +++ b/docs/COMPARISON.md @@ -0,0 +1,60 @@ +# How theAuth compares + +All sources were read on 2026-12-03. Products change, so follow the link before you decide. "Not verified" means we did not confirm it, not that it is missing. + +The theAuth column describes `@glinr/theauth` 1.2.0, the version on npm that day, checked by installing it. See [what npm serves](NPM-STATUS.md). The package is MIT, runs inside your app and keeps data in your database. + +## Better Auth + +| Topic | Finding | Source | +|---|---|---| +| Runs as | Library, with a standalone self-hosted option | [comparison](https://www.better-auth.com/docs/comparison) | +| License | MIT | [license](https://github.com/better-auth/better-auth/blob/main/LICENSE.md) | +| Email and password, social | Yes | [email](https://www.better-auth.com/docs/authentication/email-password), [OAuth](https://www.better-auth.com/docs/concepts/oauth) | +| Passkeys, TOTP, organizations | Plugins | [passkey](https://www.better-auth.com/docs/plugins/passkey), [2FA](https://www.better-auth.com/docs/plugins/2fa), [organization](https://www.better-auth.com/docs/plugins/organization) | +| SAML, SCIM | Plugins; self-service SSO setup comes with paid Infrastructure | [SSO](https://www.better-auth.com/docs/plugins/sso), [SCIM](https://www.better-auth.com/docs/plugins/scim) | +| OAuth server, MCP | Plugins | [OAuth provider](https://www.better-auth.com/docs/plugins/oauth-provider), [MCP](https://www.better-auth.com/docs/plugins/mcp) | +| Agent identity | Plugin with delegated and autonomous agents, marked not yet stable | [agent auth](https://www.better-auth.com/docs/plugins/agent-auth) | +| Dashboard | Paid add-on | [infrastructure](https://www.better-auth.com/docs/infrastructure/introduction) | + +Pick it when you want a TypeScript library with a plugin for most of the list above and an optional paid dashboard. Its email and password sign in is built in, which theAuth 1.2.0 on npm does not have. + +## Auth.js + +| Topic | Finding | Source | +|---|---|---| +| Maintenance | Maintained by the Better Auth team since September 2025, which recommends Better Auth for new projects unless there are specific feature gaps | [announcement](https://better-auth.com/blog/authjs-joins-better-auth) | +| Runs as, license | Library, ISC | [readme](https://github.com/nextauthjs/next-auth), [license](https://github.com/nextauthjs/next-auth/blob/main/LICENSE) | +| Email and password | Credentials provider; you write the verification | [credentials](https://authjs.dev/getting-started/authentication/credentials) | +| Social | Yes | [readme](https://github.com/nextauthjs/next-auth) | +| Passkeys | Experimental | [WebAuthn](https://authjs.dev/getting-started/authentication/webauthn) | +| SAML | Through the external BoxyHQ service | [provider](https://github.com/nextauthjs/next-auth/blob/main/docs/pages/getting-started/providers/boxyhq-saml.mdx) | +| TOTP, organizations, OAuth server, MCP, agent identity, SCIM, dashboard | Not verified | | + +Pick it when you already run it, or you want social sign in with stateless sessions and no database. + +## Clerk + +| Topic | Finding | Source | +|---|---|---| +| Runs as | Hosted service with SDKs (the JavaScript SDKs are MIT) | [how it works](https://clerk.com/docs/guides/how-clerk-works/overview) | +| Passkeys, MFA | Paid plan for production | [pricing](https://clerk.com/pricing), [sign-in options](https://clerk.com/docs/guides/configure/auth-strategies/sign-up-sign-in-options) | +| SAML, SCIM | Pro or Business plan in production | [enterprise connections](https://clerk.com/docs/guides/configure/auth-strategies/enterprise-connections/overview), [directory sync](https://clerk.com/docs/guides/configure/auth-strategies/enterprise-connections/directory-sync) | +| OAuth server, MCP | Yes | [OAuth](https://clerk.com/docs/guides/configure/auth-strategies/oauth/single-sign-on), [agents](https://clerk.com/docs/guides/ai/agent-management) | +| Agents | Agent sessions act as a user; Agent Tasks is in beta | [agent tasks](https://clerk.com/docs/guides/ai/agent-tasks) | +| Dashboard | Yes | [dashboard](https://clerk.com/docs/guides/dashboard/overview) | + +Pick it when you want someone else to run authentication, with a dashboard and prebuilt flows, and the plan prices fit. + +## Auth0 + +| Topic | Finding | Source | +|---|---|---| +| Runs as | Hosted service | [overview](https://auth0.com/docs/get-started/auth0-overview) | +| Passkeys, social, organizations | Yes, with plan limits | [pricing](https://auth0.com/pricing) | +| SAML, SCIM | Yes; connection counts vary by plan | [SAML](https://auth0.com/docs/authenticate/protocols/saml), [inbound SCIM](https://auth0.com/docs/authenticate/protocols/scim/configure-inbound-scim) | +| MCP | Auth for MCP | [MCP](https://auth0.com/ai/docs/mcp/overview) | +| Agent identity | Agent as Principal, in Early Access, with delegated tokens | [agent as principal](https://auth0.com/docs/ai-agents-mcp/agent-as-principal) | +| Dashboard | Yes | [dashboard](https://auth0.com/docs/get-started/auth0-overview/dashboard) | + +Pick it when you need a hosted enterprise identity service, including acting as a SAML identity provider. diff --git a/docs/NPM-STATUS.md b/docs/NPM-STATUS.md new file mode 100644 index 00000000..28425f16 --- /dev/null +++ b/docs/NPM-STATUS.md @@ -0,0 +1,24 @@ +# What npm serves + +Checked on 2026-12-03 with `npm view` and installs into empty directories with npm 10.9.7. The repository is ahead of the registry, so check `npm view version` before you rely on something. + +| Package | On npm | In this repository | +|---|---|---| +| `@glinr/theauth` | 1.2.0 | 2.0.0 | +| `@glinr/theauth-client` | 1.1.1 | 1.2.0 | +| `@glinr/theauth-mcp` | 1.1.1 | 2.0.0 | +| `@glinr/theauth-cli` | 1.2.0 | 1.3.0 | +| `@glinr/theauth-email` | 4.1.0 | 4.1.1 | +| `@glinr/theauth-gateway` | 4.0.2 | 4.2.0 | +| `@glinr/theauth-react` | 0.7.1 | 0.8.0 | +| Framework adapters (Hono, Express, Next.js, Fastify, Nuxt, SvelteKit, Astro, NestJS, SolidStart, TanStack) | 5.1.0 | see each `package.json` | + +## Compatibility with core 1.2.0 + +- The published framework adapters and the gateway declare `@glinr/theauth` `>=0.7.1 <1.0.0` as a peer. The email package declares `>=0.6.0 <1.0.0`. +- `npm install @glinr/theauth @glinr/theauth-hono hono` finishes without an error and installs core 0.8.0, not 1.2.0. The same happens with `@glinr/theauth-email`. Check `npm ls @glinr/theauth` after installing. +- `@glinr/theauth-cli` 1.2.0 fails to install with `Unsupported URL Type "workspace:"`. + +## Not in core 1.2.0 + +Built-in email and password, `auth.user` and the `@glinr/theauth/http` handler exist in the repository only. The [core changelog](../packages/core/CHANGELOG.md) lists the rest of 2.0.0. The pages at docs.theauth.dev describe the repository. diff --git a/docs/llms.txt b/docs/llms.txt index 1ddd0892..93b8f797 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -2,7 +2,7 @@ > Open-source auth for AI agents and humans. Agent identity, delegation, MCP OAuth 2.1, passkeys and SSO for TypeScript. -Install the SDK with `pnpm add @glinr/theauth`. The full text of every page is in llms-full.txt. +Install the SDK with `pnpm add @glinr/theauth`. These pages describe the repository, which can be ahead of npm: on 2026-12-03 npm served 1.2.0 of the core package. Check https://github.com/glincker/theauth/blob/main/docs/NPM-STATUS.md. The full text of every page is in llms-full.txt. ## Docs diff --git a/scripts/generate-llms.mjs b/scripts/generate-llms.mjs index 953f196f..b587ef7d 100644 --- a/scripts/generate-llms.mjs +++ b/scripts/generate-llms.mjs @@ -15,7 +15,7 @@ export function buildLlms(pages) { "", "> Open-source auth for AI agents and humans. Agent identity, delegation, MCP OAuth 2.1, passkeys and SSO for TypeScript.", "", - "Install the SDK with `pnpm add @glinr/theauth`. The full text of every page is in llms-full.txt.", + "Install the SDK with `pnpm add @glinr/theauth`. These pages describe the repository, which can be ahead of npm: on 2026-12-03 npm served 1.2.0 of the core package. Check https://github.com/glincker/theauth/blob/main/docs/NPM-STATUS.md. The full text of every page is in llms-full.txt.", "", "## Docs", "", From 301da0e6c659d22761daf7a880fd826084226907 Mon Sep 17 00:00:00 2001 From: GDS K S Date: Thu, 3 Dec 2026 12:30:22 -0600 Subject: [PATCH 2/2] docs: update the test file count --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index baf1b04c..32bbe6ff 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ A blank cell means we did not verify it. Sources, retrieval dates and when each |---|---| | Private vulnerability reporting, or support@glinr.com | [Security policy](SECURITY.md) | | Tests, CodeQL, OSV scan, dependency review, Scorecard | [Workflows](.github/workflows) | -| 581 test files under `packages/` (counted 2026-12-03) | [packages](packages) | +| 610 test files under `packages/` (counted 2026-12-03) | [packages](packages) | | npm provenance attestation on `@glinr/theauth` 1.2.0 | [npm](https://www.npmjs.com/package/@glinr/theauth/v/1.2.0) | | MIT license, governance and maintainers | [License](LICENSE), [Governance](GOVERNANCE.md), [Maintainers](MAINTAINERS.md) |