const auth = betterAuth({
database: ...,
advanced: {
defaultCookieAttributes: {
sameSite: "none",
secure: true,
httpOnly: true,
...(app.config.NODE_ENV === "production" ? { partitioned: true } : {}),
},
},
emailAndPassword: {
enabled: true,
},
trustedOrigins: [
"http://localhost:5180",
"https://web.example.com",
],
const auth = betterAuth({
database: ...,
advanced: {
defaultCookieAttributes: {
sameSite: "none",
secure: true,
httpOnly: true,
...(app.config.NODE_ENV === "production" ? { partitioned: true } : {}),
},
},
emailAndPassword: {
enabled: true,
},
trustedOrigins: [
"http://localhost:5180",
"https://web.example.com",
],