I'm working on an application, building front end using angular and back end using node JS. For authentication, since we have to go with windows authentication, i chose Node-sspi as it is simple to implement and found it effective. Below i'm posting a simple code similar to the code i'm working with.

```
var http = require('http');
var port = process.env.PORT || 8080;
var express = require('express');
var app = express();

app.use(function (req, res, next) {
    var nodeSSPI = require('node-sspi')
    var nodeSSPIObj = new nodeSSPI({
      retrieveGroups: true
    })
    nodeSSPIObj.authenticate(req, res, function(err){
      res.finished || next()
    })
})

app.use(function(req, res, next) {
  var out =
    'Hello ' +
    req.connection.user +
    '! Your sid is ' +
    req.connection.userSid +
    ' and you belong to following groups:<br/><ul>'
  if (req.connection.userGroups) {
    for (var i in req.connection.userGroups) {
      out += '<li>' + req.connection.userGroups[i] + '</li><br/>\n'
    }
  }
  out += '</ul>'
  res.send(out)
})

app.listen(port, function(){
    console.log('server is listening on port '+port);
})

console.log('Your application is listening on port '+port);

```

When i browse this on local, i'm able to do the authentication part and can see the landing page. 
the problem is when i deploy it on azure or on IIS it is keep on asking me for the authentication. 

Please let me know how to achieve windows authentication using node-sspi on IIS and Azure.