mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 20:37:44 +00:00
feat: custom session response (#579)
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
twoFactor,
|
||||
oneTap,
|
||||
oAuthProxy,
|
||||
createAuthEndpoint,
|
||||
} from "better-auth/plugins";
|
||||
import { reactInvitationEmail } from "./email/invitation";
|
||||
import { LibsqlDialect } from "@libsql/kysely-libsql";
|
||||
@@ -16,7 +17,7 @@ import { resend } from "./email/resend";
|
||||
import { MysqlDialect } from "kysely";
|
||||
import { createPool } from "mysql2/promise";
|
||||
import { nextCookies } from "better-auth/next-js";
|
||||
import * as ac from "./access-control";
|
||||
import { customSession } from "./auth/plugins/custom-session";
|
||||
|
||||
const from = process.env.BETTER_AUTH_EMAIL || "delivered@resend.dev";
|
||||
const to = process.env.TEST_EMAIL || "";
|
||||
@@ -112,12 +113,6 @@ export const auth = betterAuth({
|
||||
},
|
||||
plugins: [
|
||||
organization({
|
||||
ac: ac.ac,
|
||||
roles: {
|
||||
admin: ac.admin,
|
||||
owner: ac.owner,
|
||||
member: ac.member,
|
||||
},
|
||||
async sendInvitationEmail(data) {
|
||||
const res = await resend.emails.send({
|
||||
from,
|
||||
@@ -159,5 +154,6 @@ export const auth = betterAuth({
|
||||
oneTap(),
|
||||
oAuthProxy(),
|
||||
nextCookies(),
|
||||
customSession(),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user