"Auth error Error: Not Found" when trying to authorize on Swagger

OpenEMR Version:
I’m using OpenEMR version 7.0.0

Browser:
Google Chrome

Operating System:
Windows 11

Situation:
I am using XAMPP to run Apache as my webserver and MySQL for database management.

I am running the following command to register my client - note that for testing purposes, I just need the Patient.read scope to work for now:

curl -X POST -k -H ‘Content-Type: application/json’ -i http://localhost/openemr/oauth2/default/registration --data ‘{
“application_type”: “private”,
“redirect_uris”:
["http://localhost/openemr/swagger/oauth2-redirect.html"],
“client_name”: “My App”,
“token_endpoint_auth_method”: “client_secret_post”,
“contacts”: ["me@test.com"],
“scope”: “openid offline_access api:oemr api:fhir api:port user/Patient.read”
}’

I then go on Swagger at http://localhost/openemr/swagger/index.html to authorize using the response’s client_id and client_secret. This is where the first issue comes to light, where clicking the green Authorize button links me to
http://localhost/oauth2/default/authorize?response_type=code&client_id=fj3tIfVE1Byl1-5Lg5sjeHNeZ6EWRVxDEeZSQLlQXKs&redirect_uri=http%3A%2F%2Flocalhost%2Fopenemr%2Fswagger%2Foauth2-redirect.html&scope=openid%20offline_access%20launch%2Fpatient%20api%3Afhir%20user%2FPatient.read&state=RnJpIERlYyAzMCAyMDIyIDE1OjI3OjA5IEdNVC0wNTAwIChFYXN0ZXJuIFN0YW5kYXJkIFRpbWUp&code_challenge=iG8YFF_LqtgbgKZ8zXMGYBOYe5MkwccK5GEu0QvUCzw&code_challenge_method=S256

Notice that the url says http://localhost/oauth2 and NOT http://localhost/openemr/oauth2 - but manually inserting the “/openemr” takes me to the proper sign in prompt (the original URL took me to a “Not Found” error page). My intuition says that this may have something to do with the error I’m about to explain.

So after manually changing the url, I login as OpenEMR with my admin account, select the sample patient I created, then click “Authorize” on the final prompt. The tab then closes out and I am taken back to Swagger, where I am shown the following error:

I have no idea where to go from here and none of the resources I found online seem to help. Any help would be greatly appreciated!

Please let me know if there’s any more screenshots or information I need to provide.

Look at your Globals/Config->Connector-> Site Address Override is set. It needs to be set to http://localhost/openemr/ if that is where you have your webroot set.

Also in Globals → Logging->System Error Logging Options set it to be Debug. Check your php error logs for detailed logs of what may not be working for you.