I’m currently working on integrating OpenEMR with my application using OAuth2. Everything seems to be functioning correctly, except for one critical issue. When I make a request to the /oauth2/default/userinfo
endpoint, it returns a status code 200, but I don’t receive any user information in the response.
My goal is to identify the user who is currently logged in to my application so that I can save certain preferences specific to that user.
Here is a simplified version of my OAuth2 flow:
- The user logs in through OpenEMR’s OAuth2 authentication.
- After successful authentication, my application requests user information from
/oauth2/default/userinfo
. - Instead of receiving user details, I get an empty response with a 200 status code.
I’ve double-checked my OAuth2 configuration, and it seems to be set up correctly. Is there something specific I need to do to ensure that the /oauth2/default/userinfo
endpoint returns the user’s information?
Any guidance on how to resolve this issue or suggestions for troubleshooting would be greatly appreciated. Thank you!