fix(next-cookies): leaks unnecessary cookie (#8193)

This commit is contained in:
Maxwell
2026-02-27 11:54:51 -08:00
committed by GitHub
parent 2fd1ef38e7
commit 7ccf9cfefc

View File

@@ -47,6 +47,8 @@ export const nextCookies = () => {
}
try {
cookieStore.set("__better-auth-cookie-store", "1", { maxAge: 0 });
// If cookie was set successfully, we should clean up.
cookieStore.delete("__better-auth-cookie-store");
} catch {
await setShouldSkipSessionRefresh(true);
}