I am using the LDAP authentication in my application. So I need to pass the username/password to the server, I used Meteor.methods and Meteor.call but the authentication doesn’t always work.
When I enter the wrong information, I get the excepted result (Access denied) so I try entering the correct information in the same page however the login doesn’t seem to work and I have to refresh the page. Basically what happens is that the button click event is just detected once and I have to refresh the page for it to be able to be detected again.
Where does that come from, I can’t find that in your code.
What I suspect is that an error is raised somewhere and that will fail the method. And therefore implicitly gives you the idea that you handled the failed login.
When it’s successful you really check for a result and that won’t happen. So it is likely about the return values from the method.
Can you show the output of the server console?
ps: Could you indent your code, it’s hard to read this way.
So you don’t really login to Meteor actually, you just send some data to the server and then you return a result, correct?
You problem is in those Futures I assume. Cannot debug it for you but from what I see the future result just doesn’t come back to the client at first sight. You need to debug that. It looks like you use the model as described here:
What do you get back on the client? And doesn’t that console.log(“result :”+myFuture.wait()); conflict because it receives the result? Not sure on that, just some ideas.
Did you try existing packages for LDAP?
Don’t you want a real login? Did you see things like this: