mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
docs: remove unused schema from stripe docs
This commit is contained in:
@@ -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!,
|
||||
|
||||
@@ -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`
|
||||
|
||||
<DatabaseTable
|
||||
fields={[
|
||||
{
|
||||
name: "id",
|
||||
type: "string",
|
||||
description: "Unique identifier for each customer",
|
||||
isPrimaryKey: true
|
||||
},
|
||||
{
|
||||
name: "stripeCustomerId",
|
||||
type: "string",
|
||||
description: "The Stripe customer ID"
|
||||
},
|
||||
{
|
||||
name: "userId",
|
||||
type: "string",
|
||||
description: "The user ID this customer is associated with",
|
||||
isForeignKey: true
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
type: "Date",
|
||||
description: "Timestamp of when the customer was created"
|
||||
},
|
||||
{
|
||||
name: "updatedAt",
|
||||
type: "Date",
|
||||
description: "Timestamp of when the customer was last updated"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user