This package wraps the auth hasher service binding for Better Auth-style password hashing flows.
This is a private workspace package.
- it exists to support the template's Better Auth integration path
- it is
private: true - it is not published as a standalone npm package from this repository
- uses
AUTH_HASHERwhen running inside Cloudflare Workers - falls back to local Better Auth hashing outside Workers
- keeps binding lookup isolated from framework-specific code
Guides and examples:
This adapter keeps hash() and verify() wired to the hasher Worker, but it does not persist upgraded hashes by itself.
If you later move from free-tier-fallback-2026q1 to standard-2026q1, combine Better Auth verification with verifyAndMaybeRehash() from @cloudflare-auth-hasher/client in your post-login flow.
That split is intentional:
- the adapter keeps the primary Better Auth hash/verify surface small
verifyAndMaybeRehash()stays the explicit migration path for replacing weaker stored hashes
import { createAuthPasswordHasher } from "@cloudflare-auth-hasher/better-auth-adapter";
const hasher = createAuthPasswordHasher(event, {
fallback: {
hashPassword: fallbackHashPassword,
verifyPassword: fallbackVerifyPassword
}
});