mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
fix: clear cache cookies on signout
This commit is contained in:
@@ -28,6 +28,12 @@ export const auth = betterAuth({
|
||||
dialect: libsql,
|
||||
type: "sqlite",
|
||||
},
|
||||
session: {
|
||||
cookieCache: {
|
||||
enabled: true,
|
||||
maxAge: 60,
|
||||
},
|
||||
},
|
||||
emailVerification: {
|
||||
async sendVerificationEmail({ user, url }) {
|
||||
console.log("Sending verification email to", user.email);
|
||||
|
||||
@@ -15,6 +15,7 @@ export const signOut = createAuthEndpoint(
|
||||
ctx.context.secret,
|
||||
);
|
||||
if (!sessionCookieToken) {
|
||||
deleteSessionCookie(ctx);
|
||||
throw new APIError("BAD_REQUEST", {
|
||||
message: "Session not found",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user