nuxt-openid-connect
nuxt-openid-connect copied to clipboard
Customizing HTTP requests
Hi,
On my project, I sometimes encounter timeouts during the authentication process.
[nuxt] [request error] [unhandled] [500] outgoing request timed out after 3500ms
at ./.output/server/node_modules/openid-client/lib/helpers/request.js:140:13
at Function.discover (./.output/server/node_modules/openid-client/lib/issuer.js:143:22)
at initClient (./.output/server/chunks/runtime.mjs:6840:18)
at Object.handler (./.output/server/chunks/runtime.mjs:7030:23)
at Object.handler (./.output/server/chunks/runtime.mjs:3068:19)
at Server.toNodeHandle (./.output/server/chunks/runtime.mjs:3338:7)
It's an error message from the openid-client package which has a default timeout value of 3500ms. The solution would be to set an increased default timeout value: https://github.com/panva/node-openid-client/tree/main/docs#customizing
Are there any current way of setting the "openid-client" timeout in nuxt-openid-connect that I have missed or is this a development planned later?
If it helps, here is the Next same issue that was done :
- Issue : https://github.com/nextauthjs/next-auth/discussions/3186
- PR : https://github.com/nextauthjs/next-auth/pull/3188/files
Thanks!