diff --git a/demo/nextjs/lib/auth.ts b/demo/nextjs/lib/auth.ts index 0864f951..e34cad01 100644 --- a/demo/nextjs/lib/auth.ts +++ b/demo/nextjs/lib/auth.ts @@ -9,6 +9,7 @@ import { oAuthProxy, openAPI, oidcProvider, + customSession, } from "better-auth/plugins"; import { reactInvitationEmail } from "./email/invitation"; import { LibsqlDialect } from "@libsql/kysely-libsql"; @@ -160,6 +161,15 @@ export const auth = betterAuth({ loginPage: "/sign-in", }), oneTap(), + customSession(async (session) => { + return { + ...session, + user: { + ...session.user, + dd: "test", + }, + }; + }), stripe({ stripeClient: new Stripe(process.env.STRIPE_KEY!), stripeWebhookSecret: process.env.STRIPE_WEBHOOK_SECRET!, diff --git a/docs/content/docs/plugins/stripe.mdx b/docs/content/docs/plugins/stripe.mdx index 9d868fb5..c36b0abb 100644 --- a/docs/content/docs/plugins/stripe.mdx +++ b/docs/content/docs/plugins/stripe.mdx @@ -404,39 +404,18 @@ You can configure trial periods for your plans: The Stripe plugin adds the following tables to your database: -### Customer -Table Name: `customer` +### User + +Table Name: `user` @@ -529,12 +508,6 @@ To change the schema table names or fields, you can pass a `schema` option to th stripe({ // ... other options schema: { - customer: { - modelName: "stripeCustomers", // map the customer table to stripeCustomers - fields: { - stripeCustomerId: "externalId" // map the stripeCustomerId field to externalId - } - }, subscription: { modelName: "stripeSubscriptions", // map the subscription table to stripeSubscriptions fields: {