Closed leofreitas closed 2 months ago
Hi Leo, thanks for suggesting these changes. I haven't been using the Generic OAuth in production, so it's good to hear you've been able to get it working with these changes. Before merging, I think I'm reading the code correctly, but just wanted to check: it looks like preferred_name is being used as an authentication field (which generally wouldn't be a unique field in Gibbon), but that's only for data on the other end of the OAuth authentication? And so, the returned value matching the usernameAttribute
would still need to match a valid username in Gibbon, from what I can see? Just wanted to check, since the use of a non-unique value here could have unwanted side-effects. Thanks!
Hi Sandra, that's right! The usernameAttribute in my example is preferred_name. It's on the other side of OAuth authentication, so the value returned needs to match a valid username in Gibbon.
Thanks Leo for confirming! These changes look good, I've merged them into v27
Description Some systems require additional parameters for a login request in order to read the user's basic profile.
Motivation and Context I needed to do SSO and the institution did not use the email field as a username. With this PR, the user can configure it without changing the code. Now it is more generic and flexible.
How Has This Been Tested? Locally and Travis
Screenshots![image](https://github.com/GibbonEdu/core/assets/1969911/c91aaf70-891e-4d50-9f65-63e9ccf5927e)