I have used node.js restify and angularjs to create a web app with no user administration. Now, I would like to add the user administration feature.
Users need to login to gain access to the web app. If they are not authenticated, they will be redirected to a default URL at www.webroot.com/login.html
.
I am looking at the right node.js module to implement this feature but am at a loss at the moment. The 2 modules that caught my attention is passport-restify
and passport-http
.
https://www.npmjs.com/package/passport-restify https://www.npmjs.com/package/passport-http
Here are some questions to implement this feature;
Which node.js module can be used to implement this user login feature? What is the difference between the two?
Is the actual URL redirecting action done using angularjs or node.js?
What are some sample code examples for user login? So far, I find documentation but few sample codes.