OAuth + clever

Re: OAuth + clever

by Ripal Nathuji -
Number of replies: 2

Hi Shailesh,

I came across your question when hitting the same issue trying to setup Clever OAuth in a test bed and wanted to share what I ended up finding in case it's useful: I used https://api.clever.com/me as the userinfo_endpoint. To get that to work, though, you need to set appropriate user field mappings in Moodle's service configuration as well. I ended up trying data-name-first --> firstname, data-name-last --> lastname, and data-email --> email. Using that configuration, I was able to login successfully with teacher / student credentials from the sandbox district.

In reply to Ripal Nathuji

Re: OAuth + clever

by Shail Jai -
Hi Ripal,

Thanks for your inputs. I tried the suggestion given by you but for me, it’s giving the same error.
I kept the other fields as it is and only mapped above 3 fields.
In reply to Shail Jai

Re: OAuth + clever

by Ripal Nathuji -
Hi Shailesh,

Apologies, I should have updated this post: As it turns out, my initial testing happened to work as the account I was using returned necessary data at the /me endpoint. However, it must have been a fluke as once we got setup with our dedicated sandbox things didn't work. I ended up writing oauth2 client / service code for Clever (similar to the implementation for LinkedIn at https://github.com/moodle/moodle/tree/master/lib/classes/oauth2) to make things work. However, in the process of getting a Moodle deployment with those changes certified by Clever (if approved I was going to look at getting the code upstream), I was informed they may make their API OIDC-compliant soon which would solve the problem altogether. I'm currently in a holding state until I hear back on the OIDC changes, but fingers crossed that will happen and Clever can be configured without any code changes.

Thanks!
Ripal