0

I'm using npm passport-ldapauth module and I want to recover the user credentials when the authentications fails so that I can apply with the same credentials another login strategy. Is there any way to obtain this?

Thanks!

Jose García
  • 125
  • 8
  • Don't you have to pass the username/password to `passport-ldapauth` in the first place? – Gabriel Luci Aug 22 '19 at 15:39
  • I get it from HTML body but when it fails I don't have that information accessible. – Jose García Aug 22 '19 at 16:54
  • Why not keep it somewhere you can still access it? – Gabriel Luci Aug 22 '19 at 17:30
  • Because I don't have any way to keep it, so I need that the ldapauth-passport in case that it fails, it also returns my the request. I was searchin an optional parameter to obtain this, but I didnt't find nothing about it. – Jose García Aug 23 '19 at 06:20
  • There is always a way :) For example, search for "session variables node.js" and you will find results like [this](https://stackoverflow.com/questions/5765777/nodejs-how-to-create-and-read-session-with-express). – Gabriel Luci Aug 24 '19 at 20:30

0 Answers0