InternalOAuthError: Failed to obtain access token

Hello,

I saw some post having the same issue but the specificity here is that it only happens once in a while for me, making it really hard to debug.

I have a nodejs app in a kubernetes cluster with cloudflare in front. I use passport with passport-oauth2 strategy. I have put trust-proxy and sess.proxy = true. I don’t have rules trying to hit an external service.

I think the error occurs on a 1 to 20 connections basis. The error message isn’t really helping me to understand what I should do.

The error is often followed by a Error: failed to fetch user profile.

Thanks for helping