diff --git a/packages/better-auth/src/plugins/oauth-proxy/index.ts b/packages/better-auth/src/plugins/oauth-proxy/index.ts index 85bef5673f..fa8ebfb5c0 100644 --- a/packages/better-auth/src/plugins/oauth-proxy/index.ts +++ b/packages/better-auth/src/plugins/oauth-proxy/index.ts @@ -10,7 +10,7 @@ import { env } from "../../utils/env"; import { getOrigin } from "../../utils/url"; function getVenderBaseURL() { - const vercel = `https://${env.VERCEL_URL}`; + const vercel = env.VERCEL_URL ? `https://${env.VERCEL_URL}` : undefined; const netlify = env.NETLIFY_URL; const render = env.RENDER_URL; const aws = env.AWS_LAMBDA_FUNCTION_NAME;