fix: mysql returning failing on update

This commit is contained in:
Bereket Engida
2024-11-16 00:34:57 +03:00
parent 1dc5544dd0
commit f9a30c357d
6 changed files with 107 additions and 40 deletions

View File

@@ -13,6 +13,8 @@ import { reactInvitationEmail } from "./email/invitation";
import { LibsqlDialect } from "@libsql/kysely-libsql";
import { reactResetPasswordEmail } from "./email/rest-password";
import { resend } from "./email/resend";
import { MysqlDialect } from "kysely";
import { createPool } from "mysql2/promise";
const from = process.env.BETTER_AUTH_EMAIL || "delivered@resend.dev";
const to = process.env.TEST_EMAIL || "";
@@ -22,11 +24,15 @@ const libsql = new LibsqlDialect({
authToken: process.env.TURSO_AUTH_TOKEN || "",
});
const mysql = new MysqlDialect(
createPool("mysql://user:password@localhost:3306/better_auth"),
);
export const auth = betterAuth({
appName: "Better Auth Demo",
database: {
dialect: libsql,
type: "sqlite",
dialect: mysql,
type: "mysql",
},
session: {
cookieCache: {