fix local auth cookie detection

This commit is contained in:
Prasanna A P 2026-07-30 00:41:15 -07:00
parent 14c4f1076c
commit 81fb87ef59

View file

@ -7,6 +7,7 @@ const LOCAL_DEV_HOSTS = new Set(["localhost", "127.0.0.1", "::1"])
function getAuthSessionCookie(request: Request): string | null {
return (
getSessionCookie(request) ??
getSessionCookie(request, { cookiePrefix: "better-auth-dev-localhost" }) ??
getSessionCookie(request, { cookiePrefix: "better-auth-dev" })
)
}