pulsejet / nextcloud-oidc-login

Nextcloud login via a single OpenID Connect 1.0 provider
https://apps.nextcloud.com/apps/oidc_login
GNU Affero General Public License v3.0
220 stars 59 forks source link

Error getting DN for LDAP user #214

Closed gryffus closed 1 year ago

gryffus commented 1 year ago

Hello,

recently I have been trying to use nextcloud-oidc-login in proxy mode with already working LDAP backend.

After setting up, I am stuck on "Error getting DN for LDAP user" when trying to authenticate. I have modified LoginService.php to get if it tries to get DN for the correct ldapUid:

    $dns = $access->fetchUsersByLoginName($ldapUid);
    echo $ldapUid;
    if (empty($dns)) {
        throw new LoginException($this->l->t('Error getting DN for LDAP user'));

and the $ldapUid variable contains correct LDAP entryUUID value.

What can I do to debug this even more and find out why the LDAP query is failing?

Thank you very much.

gryffus commented 1 year ago

Sorry, my fault.

Fixed by setting up 'ldap_uid' => 'upn',