mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-18 11:32:15 -05:00
chore(demo): remove cookie and baseURL
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user