Programming language and version: TypeScript v4.7.2
Link to your project on Github/Gitlab: private
Your issue
After successfully logged in my Next.js application via Auth0 (I use the auth0-nextjs package Auth0 Next.js SDK Quickstarts: Login), I get a 502 Bad Gateway on the redirect page /api/auth/callback?code=xxx&state=yyy.
The 502 seems not to be returned by Auth0, what you show on the screenshot is the initiator. I understand it more in a way that the call started from Auth0 and pointed to our domain (which is the /api/auth/callback endpoint). I checked your link but I did not find anything relevant there. I sense there is an issue with the way Next.js redirects to the front, maybe it conflicts with Qovery nginx config (like a bad redirect code or sth?).
I don’t know but I can take a look since Qovery itself uses Auth0. We are developing the Qovery web interface with Qovery (hehe) and we have no issues like this. But I can definitely investigate in a few hours with one of my engineers. I am pretty we’ll find out what’s going on
@soywod I tried and I have the feeling that the problem is coming from the configuration of NextJS with Auth0. The error I receive is invalid_grant (Invalid authorization code)
This error happens when the auth code is not valid. I can reproduce this error when I use a invalid or already used token in the url. But from a fresh login with a valid code, I have this 502 Bad Gateway.
We are experiencing this issue on production (using custom domain) even after calling qovery api to update {"network.ingress.proxy_buffer_size_kb": 10} Is there any other configuration we need to perform for custom domains?