Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with authenticating #244

Open
JonathanFrias opened this issue Jan 23, 2018 · 0 comments
Open

Issue with authenticating #244

JonathanFrias opened this issue Jan 23, 2018 · 0 comments

Comments

@JonathanFrias
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant