Set up a proxy for third-party requests #375

Closed
opened 2026-03-13 07:43:52 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @hellokaton on GitHub (Dec 9, 2024).

I hope to provide a configuration setting for a better fetch proxy URL.

When I use google login and callback to my local environment, I always get fetch failed because I have to request the google api once.

 ERROR    fetch failed                               Better Auth

  at node:internal/deps/undici/undici:13392:13
  at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
  at async betterFetch (.next/server/chunks/node_modules__pnpm_4db766._.js:4017:20)
  at async T (.next/server/chunks/81f4f_better-auth_dist_4f865b._.js:381:33)
  at async .next/server/chunks/81f4f_better-auth_dist_4f865b._.js:2028:13
  at async handle (.next/server/chunks/node_modules__pnpm_4db766._.js:3023:23)
  at async a.<computed> (.next/server/chunks/81f4f_better-auth_dist_4f865b._.js:3452:17)
  at async handler (.next/server/chunks/node_modules__pnpm_4db766._.js:3233:32)
  at async handler (.next/server/chunks/node_modules__pnpm_4db766._.js:3284:25)
  at async dispatch (.next/server/chunks/node_modules__pnpm_4db766._.js:898:27)
  at async dispatch (.next/server/chunks/node_modules__pnpm_4db766._.js:898:27)
  at async .next/server/chunks/node_modules__pnpm_4db766._.js:1173:33

GET /api/auth/callback/google?state=_4BskQCku9gWrPa6ts9-SpnMfMA8mrDg2DZdGsAh-zI&code=4%2F0AeanS0bRKrB3EUtH3wJAM_LKxrofnvHD68hAdUzvPT733aKAmj4-M7d7gvdnU6cVIjkS6A&scope=email+profile+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&authuser=1&prompt=consent 302 in 11014ms
 GET /api/auth/error?error=please_restart_the_process 200 in 50ms
Originally created by @hellokaton on GitHub (Dec 9, 2024). **I hope to provide a configuration setting for a better fetch proxy URL.** When I use google login and callback to my local environment, I always get fetch failed because I have to request the google api once. ```bash ERROR fetch failed Better Auth at node:internal/deps/undici/undici:13392:13 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async betterFetch (.next/server/chunks/node_modules__pnpm_4db766._.js:4017:20) at async T (.next/server/chunks/81f4f_better-auth_dist_4f865b._.js:381:33) at async .next/server/chunks/81f4f_better-auth_dist_4f865b._.js:2028:13 at async handle (.next/server/chunks/node_modules__pnpm_4db766._.js:3023:23) at async a.<computed> (.next/server/chunks/81f4f_better-auth_dist_4f865b._.js:3452:17) at async handler (.next/server/chunks/node_modules__pnpm_4db766._.js:3233:32) at async handler (.next/server/chunks/node_modules__pnpm_4db766._.js:3284:25) at async dispatch (.next/server/chunks/node_modules__pnpm_4db766._.js:898:27) at async dispatch (.next/server/chunks/node_modules__pnpm_4db766._.js:898:27) at async .next/server/chunks/node_modules__pnpm_4db766._.js:1173:33 GET /api/auth/callback/google?state=_4BskQCku9gWrPa6ts9-SpnMfMA8mrDg2DZdGsAh-zI&code=4%2F0AeanS0bRKrB3EUtH3wJAM_LKxrofnvHD68hAdUzvPT733aKAmj4-M7d7gvdnU6cVIjkS6A&scope=email+profile+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&authuser=1&prompt=consent 302 in 11014ms GET /api/auth/error?error=please_restart_the_process 200 in 50ms ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#375