chore(demo): remove cookie and baseURL

This commit is contained in:
Alex Yang
2025-11-20 17:12:40 -08:00
parent c50e27ac86
commit 14f7772244
-21
View File
@@ -50,23 +50,8 @@ if (!dialect) {
throw new Error("No dialect found");
}
const baseURL: string | undefined =
process.env.VERCEL === "1"
? process.env.BETTER_AUTH_URL
? process.env.BETTER_AUTH_URL
: `https://${process.env.VERCEL_URL}`
: undefined;
const cookieDomain: string | undefined =
process.env.VERCEL === "1"
? process.env.BETTER_AUTH_URL
? new URL(process.env.BETTER_AUTH_URL).hostname
: `.${process.env.VERCEL_URL}`
: undefined;
export const auth = betterAuth({
appName: "Better Auth Demo",
baseURL,
database: {
dialect,
type: "sqlite",
@@ -351,10 +336,4 @@ export const auth = betterAuth({
lastLoginMethod(),
],
trustedOrigins: ["exp://", "https://appleid.apple.com"],
advanced: {
crossSubDomainCookies: {
enabled: process.env.NODE_ENV === "production",
domain: cookieDomain,
},
},
});