I am currently trying the utilize the oauth2 functionality for Moodle version 3.8.1+. I have entered the client Id, client secret, service base url, authorization endpoint, token endpoint, and userinfo endpoint.
Afterwards, I clicked "connect to a system account" where it does hit my service endpoint where I can sign in. However, once I sign into my custom service with the correct credentials I receive the following error:
error/Could not upgrade oauth token