One of my cloudflared websites is reporting a 502 error with one-time passcode

Hi,
I have setup multiple zerotrust cloudflared application. All of them work except for one which reports a 502 error. This only happens when I enable one-time passcode. It is fine if I disable authentication so it doesn’t sound like it is actually a ‘502 bad gateway’.
Any help would be appreciated. It is a http website running internally.