Better AuthBA
Better Auth6mo ago
zk

Social login times out in production

hey everyone, i'm currently running into an issue where calling /api/auth/sign-in/social in production times out wheras it's working in local dev.

can confirm all env vars are being pulled properly in production and that the production URL is properly set as an origin and a callback url through the gcloud dashboard.

has anyone else run into the same issue?

current setup:
export const auth = betterAuth({
  secret: betterAuthSecret,
  database: new Pool({
    connectionString: databaseUrl,
  }),
  socialProviders: {
    google: {
      clientId: googleClientId!,
      clientSecret: googleClientSecret!,
    },
  }
}); 


import { auth } from "@/lib/auth";
import { toNextJsHandler } from "better-auth/next-js";
 
export const { POST, GET } = toNextJsHandler(auth); 
Screenshot_2025-07-15_at_2.34.29_p.m..png
Was this page helpful?