diegoc this is likely an issue with the URL configured for "Api URL providing user details when authenticated". When Flarum hits that endpoint using the oauth2 token as authentication header, it should return a valid JSON payload with the at least an email
key.
I don't think there's any way to see what the actual response was. If you need more information to troubleshoot you could log all controller output from your oauth server, use some sort of proxy proxy, or manually call the endpoint with an oauth token to try to reproduce the non-JSON response.