shaozi / ldap-authentication

πŸ”πŸ”πŸ” A simple Nodejs Async LDAP authentication library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usernameAttribute multiple values

myurzep opened this issue Β· comments

Hello! πŸ‘‹
Is it possible to specify multiple values in the usernameAttribute to authorize the user either by name or by email? For example, |(sAMAccountName={{username}})(mail={{username}}) does not work.
Maybe this is planned in the future?
Thank you! 😊

commented

LDAP authentication has to use the username dn and password to bind. So ldap-authentication can not do what you ask.

You will have to convert the email to username before calling the lib.

Thanks for the answer!