oauth2 debug information

oauth2 debug information

by Phil Magnuson -
Number of replies: 1

using Moodle 3.9 - using docker container lthub/moodle

I am planning to use Oauth2 from Moodle to a Django site which uses the django-oauth-toolkit.  When trying to configure the Moodle Oauth2 module, I get the following non-descriptive error "error/invalidpersistenterror".

I have verified that the request from Moodle is getting to the oauth module on Django. On the Django server there is a request for 

GET /o/.well-known/openid-configuration/ HTTP/1.1" 200 596

Where/how can I find debugging information that will provide more information on this error?  I have been unable to locate the php_error.log on this installation.  

(Note: all the development is done with containers on a local machine.  We need to test this concept before deploying.)

thanks to all,


Attachment Screen Shot 2021-05-29 at 8.08.54 AM.png
Average of ratings: -
In reply to Phil Magnuson

Re: oauth2 debug information

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

I think this will happen if the endpoint URLs in /o/.well-known/openid-configuration are HTTP instead of HTTPS.

If you change Debug messages to DEVELOPER and Display debug messages is Yes then this error becomes a bit more helpful, you'd probably get: error/invalidpersistenterror (url: For security reasons only https connections are allowed, sorry.).

However I don't think you should need to change the debug settings to see this and there's actually a bug with the language strings, see MDL-71860.