Google OAuth2 Services - error/moodle/Could not discover end points for identity issuerGoogle

Google OAuth2 Services - error/moodle/Could not discover end points for identity issuerGoogle

by Premjith KK -
Number of replies: 2
Hi,

I installed moodle 3.8 in a subdomain, and configured Google OAuth2 services.
In  Moodle OAuth2 services page,  After entering the "Client ID and Client Secret", getting this error

"error/moodle/Could not discover endpoints for identity issuerGoogle"

How to fix this issue? 






Attachment Oauth2_google_error.png
Average of ratings: -
In reply to Premjith KK

Re: Google OAuth2 Services - error/moodle/Could not discover end points for identity issuerGoogle

by Ken Task -
Picture of Particularly helpful Moodlers

Maybe somewhere in:

https://developers.google.com/identity/protocols/oauth2/web-server

I usually set up an account in google as a service account and also include scopes for Google Drive.  Even is site doesn't use Google Drive as a file system repo.

Plus on the Google end, set up all 3 tabs - credentials, Oauth consent screen, and Domain verification which includes a static termsofservice.html page on my server as well as a privacypolicies.html page.

https://docs.moodle.org/38/en/OAuth_2_Google_service

'SoS', Ken

In reply to Ken Task

Re: Google OAuth2 Services - error/moodle/Could not discover end points for identity issuerGoogle

by Premjith KK -

Hi Ken, 

Thanks for your reply.

I added below details in Outh2 services -> "Endpoints for issuer section: Google" section and restarted the server.

Issue solved.  


discovery_endpoint https://accounts.google.com/.well-known/openid-configuration

authorization_endpoint https://accounts.google.com/o/oauth2/v2/auth

device_authorization_endpoint https://oauth2.googleapis.com/device/code

token_endpoint https://oauth2.googleapis.com/token

userinfo_endpoint https://openidconnect.googleapis.com/v1/userinfo

revocation_endpoint https://oauth2.googleapis.com/revoke