mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-07 20:37:44 +00:00
fix: mysql returning failing on update
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user