claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 183 forks source link

LDAP login appears to authenticate, but login does not occur #178

Closed warrenfalk closed 7 years ago

warrenfalk commented 7 years ago

LDAP authentication may fail to save the user information in the session if it fails to correctly store the user information from the LDAP server into the session. I am not sure what exactly causes this to happen on mine (perhaps some binary properties or just raw size) but it is definitely something with the user object returned.

The authentication does occur and everything is set on the req._passport.session.user object, but upon the next request, the req._passport.session.user object is undefined again causing the login to appear successful (no error) except that the resulting page shows the user still not logged in.

Manually filtering out everything except the displayName and mail properties from the resulting user object works around this, but there does not appear to be a way to do this from the config.yaml file at this time.

claudioc commented 7 years ago

Pinging @everpcpc on this one

jandrieu commented 7 years ago

This should be closed. https://github.com/claudioc/jingo/pull/179 fixes this problem.

I experienced the same problem. Adding the attributes section to the config worked like a charm:

searchAttributes:
 - displayName
 - mail