I've looked through all of the other discussions about this and feel like yet again I'm missing something very simple. The short version of what I'm attempting to set up (is a requirement of this particular setup) is:
Internet->Cloudflare Tunnel->Application
Currently, I have all applications running through tunnels, pointing to their localhost:port configurations. I am able to access all applications without issue, including authentik.
I set up all the applications through authentik, configured all of the OIDC information on both sides of the application, even verified the setup using a local development environment. However, as soon as it's behind the Cloudflare tunnel every SSO exchange fails at the token/ endpoint with a 400 error and description of
"error": "invalid_client",
"error_description": "Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)"
} ```
I'm seeing the exact same error in the authentik logs as in the browser and cannot figure out the next step in troubleshooting how to get past this issue, especially considering the exact same setup works as long as Cloudflare is not in the mix.
Has anyone set this up like this before and have any good suggestions for next steps?