Skip to main content
better-auth and theAuth are both open-source TypeScript auth libraries, and they start from different places. better-auth grew out of human sign-in and added a plugin system on top. theAuth is built around identities that can be humans, agents or devices, so permissions, delegation and audit apply to all of them. better-auth is the larger project with the larger community, and it has an agent plugin of its own. Its latest stable release on 2026-10-31 was v1.7.14, published 2026-10-26 (GitHub API). This page lists what each documents, with the source for each row, so you can check the rows that matter to you. Where we did not verify a row for better-auth, we left it out instead of guessing. Last checked: 2026-10-31. The “did not find” statements below were last fetched on 2026-10-18 and have not all been re-read. Status words for theAuth rows: “Published” means it is in the npm release @glinr/theauth 1.2.0 (latest on 2026-10-31) or the Go release named. “Release branch” means it is in the repository and not in a published npm release. A migration guide is available: Migrate from better-auth.

What both do

Where theAuth goes further

These come from our own repository. For each of the five differentiators below we did not find the same feature on the better-auth pages we fetched on 2026-10-18. That is a statement about those pages, not proof that the feature is missing elsewhere or in a later release.
  • Approvals bound to arguments: we did not find this on the Agent Auth page we fetched on 2026-10-18. Grants can carry constraints, but the page does not define a schema or say they bind call arguments.
  • Tamper evident audit chain: we did not find one on the pages we fetched on 2026-10-18. The onEvent hook is described as a place to write audit logs, with no integrity mechanism mentioned.
  • Device principals and MQTT: we did not find these on the pages we fetched on 2026-10-18. The plugin’s “device authorization” is for a human to approve an agent.
  • ROS 2 or robotics: we did not find this on the Agent Auth page we fetched on 2026-10-18.
  • Delegation chains with revocation that reaches issued tokens: we did not find multi-hop chains on the pages we fetched on 2026-10-18. Its OAuth Provider docs say opaque access tokens are deleted at once on revocation and that revoking a refresh token removes the access tokens it minted. JWT access tokens cannot be revoked server side.
“Release branch” means the code is written and tested but is not in the npm or Go release you get today (npm @glinr/theauth is 1.2.0). Check the GitHub releases before you rely on a row.

Where better-auth is ahead or equal

  • Adoption and ecosystem. better-auth had 30.5k GitHub stars on 2026-10-31 (GitHub API) and a large plugin and integration community. It also ships more named social providers than we do. We counted 36 provider source files in its repository on 2026-10-18, which is a file count and not a figure from its docs. theAuth is new and has no user numbers we can quote.
  • Databases. better-auth documents Kysely (SQLite and D1, PostgreSQL, MySQL, MSSQL), Prisma, Drizzle and MongoDB. theAuth has Drizzle and a Prisma adapter, and the Go library has memory, SQLite, Postgres and MySQL. If you need MongoDB or MSSQL, better-auth covers it today. Redis in better-auth is secondary storage, not a database.
  • MCP. Both ship an OAuth 2.1 server for MCP, so that alone does not separate them.
  • Approvals. Both support human approval of agent actions. The difference is the argument binding noted above.
  • SAML. theAuth’s SAML verifier has not had an independent audit, and the docs say so. Treat it as experimental.

Pick theAuth if

  • Your app runs AI agents, devices or robots that need their own identity, scoped permissions, delegation and an audit trail.
  • You want one model across TypeScript and Go services.
  • You need approvals tied to the exact arguments, or revocation that reaches tokens already issued, and you can run the release branch or wait for the release.

Pick better-auth if

  • You are building a human-facing web app and want the larger community and ecosystem.
  • You need a database or provider that theAuth does not cover. Check both lists first.
  • You want its agent plugin and are fine with it being marked not yet stable.
If theAuth is the wrong fit, read When not to use theAuth.

Migrate from better-auth

Step-by-step migration with before and after code diffs.

theAuth vs Keycloak

The closest rival on devices and delegation, and where its own docs stop.

theAuth vs Hanko

How theAuth compares to the passkey-first auth library.

theAuth vs paid platforms

theAuth versus Clerk and Auth0 across cost and agent support.

Core concepts

The mental model behind agents, permissions, and audit.
Last modified on November 1, 2026