Open
Description
Version
v18.13.0
Platform
Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64
Subsystem
No response
What steps will reproduce the bug?
Request with private production credentials to back-end
How often does it reproduce? Is there a required condition?
When you try to fetch to an external url (different from front-end)
What is the expected behavior?
Successful response (ok)
What do you see instead?
https://next-auth.js.org/errors#oauth_callback_handler_error fetch failed {
message: 'fetch failed',
stack: 'TypeError: fetch failed\n' +
' at Object.fetch (node:internal/deps/undici/undici:14062:11)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async Object.jwt (webpack-internal:///(api)/./pages/api/auth/[...nextauth].ts:116:37)\n' +
Additional information
There was another issue like this, but in other versions of node:
nodejs/undici#1248
(If I change localhost to 127.0.0.1 there's no problem)