Closed vdietmar closed 3 years ago
Username is not correct for user id. In your case it maybe so, but there are systems where two different users has same username. I'll add "ID" in oauth check.
I have similar problem with my IdentityServer4 instance. In IS4 user id is GUID, so there's no sense to use it. In my case i use
if (!isset($response->identifier) && isset($response->preferred_username)) {
$response->identifier = $response->preferred_username;
}
preffered_username is a login, so it's also unique. Maybe it makes sense to add to settings a field like "Custom user id fieldname" and use it in CustomOAuth2.php?
preffered_username is a login
Are you sure ? There is no some settings in user profile which changed "preferred_username" to some user defined ?
Maybe it makes sense to add to settings a field like "Custom user id fieldname" and use it in CustomOAuth2.php?
No. Discussed many times.
Ok. I respect this decision and continue to tweak the plugin:) At the very least, this can serve as explanation for other users.
Hi,
I am using Wordpress as a OAuth server (Plugin "miniOrange OAuth 2.0 Server/Provider"). I can't get it working though initially since Nextcloud Social Login returns "Provider API returned an unexpected response".
Debugging this unveils that miniOrange returns two tags "ID" and "username". Both are not considered valid by Social Login "CustomOAuth2.php" provider:
Which then seems to lead to:
When I add this, all is good:
My conclusion is that Social Login should add more flexibility to what OAuth response tags are considered as "identifier". This could be done by a simple config setting, for example.