v2.2.0
2.2.0 (2026-08-23)
Bug Fixes
- build: make import("better-auth-firebase-auth") resolve — the root entry threw ERR_MODULE_NOT_FOUND and its types vanished under moduleResolution node16/nodenext (3396eaa)
- build: make require("better-auth-firebase-auth") work on Node >= 22.12 — main/require pointed at a never-built dist/index.cjs; the package is now ESM-only (c57e1b8)
- deps: support TypeScript 6 and 7 — the typescript peer was ^5.0.0, so npm install failed with ERESOLVE (9fc565b)
Features
- server: support Better Auth 1.7 — sign-in failed with "findOAuthUser is not a function"; accounts now carry issuer (one-time backfill for existing rows, see README); 1.5 and 1.6 keep working (e9f5b61)
Upgrade notes
Better Auth 1.7 with existing users — backfill account.issuer before your first deploy on 1.7. 1.7 looks accounts up by (issuer, accountId) and pre-1.7 rows don't have the field. Add issuer as a nullable column, run
UPDATE account SET issuer = 'local:oauth:firebase' WHERE "providerId" = 'firebase';
(other providers per the Better Auth upgrade guide), then make it NOT NULL with the unique (issuer, accountId) index (npx auth migrate can finish this step). The value is exported as FIREBASE_ACCOUNT_ISSUER from better-auth-firebase-auth/server. Skipping the backfill doesn't lock users out — the plugin falls back to matching by email and re-links — but it leaves the old account row orphaned. Details: README → Upgrading an existing app to Better Auth 1.7.
- Better Auth 1.5 and 1.6 keep working with this release; CI tests 1.5, 1.6 and 1.7.
require("better-auth-firebase-auth")now works on Node ≥ 22.12 (require(esm)); the package is ESM-only.- The root import works again — it previously threw
ERR_MODULE_NOT_FOUND(the/serverand/clientsubpaths were unaffected), and its types no longer vanish undermoduleResolution: node16/nodenext. - TypeScript 6 and 7 are supported — the
typescriptpeer is now>=5.0.0, sonpm installno longer fails with ERESOLVE.