Cloudflare 502 on express-openid-connect login route

Hello, when i try to enter the url of the login the page returns 502, but with no cloudflare proxy returns normal, this is my route config:

    router.get('/login', async function (req, res, next) {
        res.oidc.login({
            returnTo:  '/dashboard,
            authorizationParams: {
                redirect_uri:  '/auth/callback',
            }
        })
    })