From 8b336b1ec3c6a45e845343362de80381d23caa71 Mon Sep 17 00:00:00 2001 From: Morgan Roderick Date: Sat, 10 Oct 2026 09:05:35 +0200 Subject: [PATCH] fix: pin the browser better-auth client to the server's version static/auth-client.js loaded better-auth@latest from esm.sh, so the browser client could drift from the server version. Pin it to 1.7.6 (the lockfile version on main) with a comment to keep the pin synced on better-auth bumps. --- static/auth-client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/auth-client.js b/static/auth-client.js index 4093881..eb9860b 100644 --- a/static/auth-client.js +++ b/static/auth-client.js @@ -1,5 +1,8 @@ // TODO: we need a bundler, so we can re-use what we have in node_modules already -import { createAuthClient } from "https://esm.sh/better-auth@latest/client"; +// Pinned to the server's better-auth version: the browser client must match +// what the server runs. Update this pin whenever package-lock.json bumps +// better-auth. No bundler yet — see TODO above. +import { createAuthClient } from "https://esm.sh/better-auth@1.7.6/client"; export const authClient = createAuthClient({ baseURL: window.location.origin,