Could not upgrade OAuth 2 token. HTTP status for remote endpoint: 0

Re: Could not upgrade OAuth 2 token. HTTP status for remote endpoint: 0

by Leon Stringer -
Number of replies: 2
Picture of Core developers Picture of Particularly helpful Moodlers

HTTP status for remote endpoint: 0 means that Moodle is not getting a response to its request to the OAuth 2 endpoint.

If there's no response then possibly Moodle can't actually make the HTTP request, it may be blocked by SELinux or a firewall.

(The OAuth 2 endpoint is the URL for the OAuth 2 function Moodle is trying to perform as listed under Configure endpoints for the service).

In reply to Leon Stringer

Re: Could not upgrade OAuth 2 token. HTTP status for remote endpoint: 0

by Suadad Najim. لجنة المتابعة المركزية -
Hello, thank you for your interest
I'm starting to doubt the Urls used, it may be not correct, because the JSON file which I have, it does not have the same names of required URLs, please see the file below and try to determine the URL of the user info endpoint.

"auth_uri":"https://accounts.google.com/o/oauth2/auth"

"token_uri":"https://oauth2.googleapis.com/token"

"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs"

"redirect_uris":["https://nippur.qu.edu.iq/admin/oauth2callback.php"]

"javascript_origins":["https://nippur.qu.edu.iq"]}}
Thanks again