We experience the exact same problem with other libraries, like [Spring Security](https://projects.spring.io/spring-security-oauth/) and the [OpenId Connect Drupal module](https://www.drupal.org/project/openid_connect), which also set the accept header to `application/json`.