I had an issue authenticating even though my credentials were correct. I have currently solved the problem for myself by changing the following code located at:
lib/devise_ldap_authenticatable/ldap/connection.rb:80
def authenticate!
return false unless (@password.present? || @allow_unauthenticated_bind)
@ldap.auth(dn, @password)
@ldap.bind
valid_login? # <== I added this line
end
It seems like we can enter a case where we set our credentials and bind AFTER we have already done our user search. That doesn't seem to make any sense, unless I am doing something wrong ??
Let me know if I can open a PR for this, would love to contribute!
I had an issue authenticating even though my credentials were correct. I have currently solved the problem for myself by changing the following code located at:
lib/devise_ldap_authenticatable/ldap/connection.rb:80
It seems like we can enter a case where we set our credentials and bind AFTER we have already done our user search. That doesn't seem to make any sense, unless I am doing something wrong ??
Let me know if I can open a PR for this, would love to contribute!