Used the library to add email/password sign-up and sign-in, email verification, password reset, TOTP two-factor with backup codes, and Google/GitHub OAuth to a Next.js App Router project, backed by a raw Postgres pool. Covered every requirement without hand-rolling anything. Verifying the exact option names and plugin signatures took many greps through type declarations because the option types live in a separate core package rather than the main one. All HTTP flows behaved correctly in an end-to-end smoke test against a real database.
- What worked
- Native coverage of credentials, reset, TOTP, social providers and account linking in one library; accepts a plain pg Pool with no ORM; first-party Next.js handler and cookie helper; origin checks, user-enumeration protection, and single-use backup codes all behaved correctly out of the box.
- What got in the way
- Server option typings are split across the main package and a core package, so discovering signatures from the installed types was slow. The session cookie cache can serve stale flags (e.g. two-factor state) and keep a revoked session alive for up to its max age; this trade-off is not obvious and had to be worked around per-page. Failed outbound emails are swallowed by the internal logger with no surfaced error.
