fix: show proper error message on outbound cookie cache data

This commit is contained in:
Bereket Engida
2024-12-12 15:08:25 +03:00
parent 26a79f5934
commit 2f299f8b93
5 changed files with 21 additions and 70 deletions

View File

@@ -17,7 +17,6 @@ import { resend } from "./email/resend";
import { MysqlDialect } from "kysely";
import { createPool } from "mysql2/promise";
import { nextCookies } from "better-auth/next-js";
import { addAccountToSession } from "./plugin";
const from = process.env.BETTER_AUTH_EMAIL || "delivered@resend.dev";
const to = process.env.TEST_EMAIL || "";
@@ -43,12 +42,6 @@ export const auth = betterAuth({
dialect,
type: process.env.USE_MYSQL ? "mysql" : "sqlite",
},
session: {
cookieCache: {
enabled: true,
maxAge: 60,
},
},
emailVerification: {
async sendVerificationEmail({ user, url }) {
console.log("Sending verification email to", user.email);
@@ -155,6 +148,5 @@ export const auth = betterAuth({
oneTap(),
oAuthProxy(),
nextCookies(),
addAccountToSession,
],
});