custom oauth2 service (error/Could not discover end points for identity issuer)

custom oauth2 service (error/Could not discover end points for identity issuer)

by Marijan Milovec -
Number of replies: 3

Hi, I have local moodle installed and I want to create custom oauth2 service, oauth2 I have is working on some other server I have client id, client secret and ervice base url, but I get error: error/Could not discover end points for identity issuer


I do have 2 more links one is for oauth_token_url and another for oauth_user_data_url, but I cant get how to edit endpoints, where to put this url??


Thank you.

Average of ratings: -
In reply to Marijan Milovec

Re: custom oauth2 service (error/Could not discover end points for identity issuer)

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Marijan,

Did you ever figure it out?

Michael

In reply to Michael Milette

Re: custom oauth2 service (error/Could not discover end points for identity issuer)

by Marijan Milovec -

No, I did not figure it out, it seems that moodle is currently supporting only google, facebook, etc. oauth and if you have your own oauth service like I do it just doesn't work.

In reply to Marijan Milovec

Re: custom oauth2 service (error/Could not discover end points for identity issuer)

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

Unless your OAuth service supports discoverable endpoints you have to set these manually. When you create your own service (under Site administrationServerOAuth 2 services) there's an icon which says Configure endpoints if you hover over it:

OAuth 2 service settings

You need to know the name for these endpoints and the corresponding URL your service uses for each. For  authentication the endpoint names needed (based on my little experience) are:

  • authorization_endpoint
  • token_endpoint
  • userinfo_endpoint