jaredhanson/passport-twitter

Not getting the user profile after authenticated

manoharank5 opened this issue · 0 comments

I am using the following code ,but i am not getting the user profile back from the AD server, Earlier the callback function was not getting called then i have to pass the passReqToCallback as true. Now the callback function is getting called but profile is getting null.Please help me on this.

windowsStrategy = new windowsStrategy({
ldap: {
url: 'serverName', //
base: 'DC',
bindDN: 'username',//req.body['username'],
bindCredentials: 'password'//req.body['password']
},passReqToCallback:true,
integrated: false

}, function(req,profile, done){
console.log(profile);
})

app.post('/log',
function (req, res){
//console.log(req.body['username']);
passport.use(windowsStrategy);
windowsStrategy.authenticate(req)
});