0

We have been developing a web application using HTML, CSS, Node JS and MongoDB. our requirement is to authenticate user while launching the application. We want to authenticate user with windows login credential.(SSO login)

How we can get it and validate it against the user collection in mongodb using NodeJS/HTML?

Please guide.

Parag Shah
  • 17
  • 1
  • 3
  • 2
    Welcome to SO. Your question is far too broad. You need to do some research and begin trying. Then, if you face problems, come back with a *code-specific* question. – Mitya Jan 31 '19 at 19:02
  • Ok let me put more precisely. How can I get or capture windows login id using NodeJS or HTML. As I want to use this Id against the users stored in my mongodb collection. – Parag Shah Jan 31 '19 at 19:55
  • You can ask the user to download an executable file that will upload this information to your server, similar to what a remote-session software might do. You can develop an application with special application links that will open in your application to make users feel more secure. – Cody G Jan 31 '19 at 20:08
  • https://stackoverflow.com/questions/9518092/javascript-how-to-get-the-name-of-the-current-user – Cody G Jan 31 '19 at 20:08
  • Which executable file I need to ask to download? Please throw more light as I'm new to Web technology. – Parag Shah Jan 31 '19 at 20:10
  • You have to create the "executable program" that will gather the information you need and send it to your web server. That portion can be written in pretty much any language. You then serve that file via your webpage and the user downloads it. – Cody G Jan 31 '19 at 20:16
  • Thank you very much for your quick response. Could you please share sample of this code in java script. Appreciate your support. – Parag Shah Jan 31 '19 at 20:41
  • In javascript you could use electron or try compiling it into an executable. the username in node.js is under `process.env.USERNAME` – Cody G Jan 31 '19 at 21:06

1 Answers1

0

You can use the node-expose-sspi. It will give you SSO with Windows user account on NodeJS.

https://github.com/jlguenego/node-expose-sspi

Note: I am the author of this module.

jlguenego
  • 1,192
  • 15
  • 23