gabriel
gabriel
BABetter Auth
Created by gabriel on 4/18/2025 in #help
Argument `stripeCustomerId` is missing.
No description
26 replies
BABetter Auth
Created by gabriel on 4/18/2025 in #help
Argument `stripeCustomerId` is missing.
No, I manually added the field just like the documentation
26 replies
BABetter Auth
Created by gabriel on 4/18/2025 in #help
Argument `stripeCustomerId` is missing.
No description
26 replies
BABetter Auth
Created by gabriel on 4/18/2025 in #help
Argument `stripeCustomerId` is missing.
Ok
26 replies
BABetter Auth
Created by gabriel on 4/18/2025 in #help
Argument `stripeCustomerId` is missing.
26 replies
BABetter Auth
Created by gabriel on 4/18/2025 in #help
Argument `stripeCustomerId` is missing.
I'm on v1.2.7
26 replies
BABetter Auth
Created by gabriel on 4/18/2025 in #help
Argument `stripeCustomerId` is missing.
My auth config:
import { database } from '@repo/database';
import { betterAuth } from 'better-auth';
import { prismaAdapter } from 'better-auth/adapters/prisma';
import { nextCookies } from 'better-auth/next-js';
import { admin as adminPlugin } from 'better-auth/plugins';
import { keys } from './keys';
export { toNextJsHandler } from 'better-auth/next-js';
import { accessControl, user, developer, admin } from './permissions';
import { stripe } from '@repo/payments';
import { keys as paymentKeys } from '@repo/payments/keys';
import { stripe as stripePlugin } from '@better-auth/stripe';

export const auth = betterAuth({
database: prismaAdapter(database, {
provider: 'postgresql',
}),
socialProviders: {
discord: {
clientId: keys().DISCORD_CLIENT_ID,
clientSecret: keys().DISCORD_CLIENT_SECRET,
redirectURI: keys().DISCORD_REDIRECT_URI,
},
},
advanced: {
crossSubDomainCookies: {
enabled: true,
domain: 'localhost',
},
defaultCookieAttributes: {
secure: true,
httpOnly: true,
sameSite: 'none',
partitioned: true,
},
},
trustedOrigins: [
'http://localhost:3000', // APP (panel)
'http://localhost:3001', // WEB (landing & products)
'http://localhost:3002', // API
],
plugins: [
nextCookies(),
adminPlugin({
accessControl,
roles: {
admin,
developer,
user,
},
}),
stripePlugin({
stripeClient: stripe,
stripeWebhookSecret: paymentKeys().STRIPE_WEBHOOK_SECRET!,
createCustomerOnSignUp: true,
}),
],
});
import { database } from '@repo/database';
import { betterAuth } from 'better-auth';
import { prismaAdapter } from 'better-auth/adapters/prisma';
import { nextCookies } from 'better-auth/next-js';
import { admin as adminPlugin } from 'better-auth/plugins';
import { keys } from './keys';
export { toNextJsHandler } from 'better-auth/next-js';
import { accessControl, user, developer, admin } from './permissions';
import { stripe } from '@repo/payments';
import { keys as paymentKeys } from '@repo/payments/keys';
import { stripe as stripePlugin } from '@better-auth/stripe';

export const auth = betterAuth({
database: prismaAdapter(database, {
provider: 'postgresql',
}),
socialProviders: {
discord: {
clientId: keys().DISCORD_CLIENT_ID,
clientSecret: keys().DISCORD_CLIENT_SECRET,
redirectURI: keys().DISCORD_REDIRECT_URI,
},
},
advanced: {
crossSubDomainCookies: {
enabled: true,
domain: 'localhost',
},
defaultCookieAttributes: {
secure: true,
httpOnly: true,
sameSite: 'none',
partitioned: true,
},
},
trustedOrigins: [
'http://localhost:3000', // APP (panel)
'http://localhost:3001', // WEB (landing & products)
'http://localhost:3002', // API
],
plugins: [
nextCookies(),
adminPlugin({
accessControl,
roles: {
admin,
developer,
user,
},
}),
stripePlugin({
stripeClient: stripe,
stripeWebhookSecret: paymentKeys().STRIPE_WEBHOOK_SECRET!,
createCustomerOnSignUp: true,
}),
],
});
26 replies