Oauth2 works in development, but not in production

I use the PHPLeague Oauth2 client library. It authenticates against a WP Oauth Server.
When logging in in my dev environment everything works as intended.
When logging in in my prod environment I get the following error:
“Invalid response received from Authorization Server. Expected JSON.”

How can that be? What am I missing here? I have double checked my certs, my keys and just about everything else I can think of.