In /opt/gluu/passport/server/auth --
windowslive.js seems to be missing the required functions to pull user data from the profile:
```
var passport = require('passport');
var WindowsLiveStrategy = require('passport-windowslive').Strategy;
var setCredentials = function(credentials) {
var callbackURL = global.applicationHost.concat("/passport/auth/windowslive/callback");
passport.use(new WindowsLiveStrategy({
clientID: credentials.clientID,
clientSecret: credentials.clientSecret,
callbackURL: callbackURL
},
function(accessToken, refreshToken, profile, done) {
return done(null, profile);
}
));
};
module.exports = {
passport: passport,
setCredentials: setCredentials
};
```
For example, this is what google.js looks like:
```
var passport = require('passport');
var GoogleStrategy = require('passport-google-oauth2').Strategy;
var setCredentials = function(credentials) {
var callbackURL = global.applicationHost.concat("/passport/auth/google/callback");
passport.use(new GoogleStrategy({
clientID: credentials.clientID,
clientSecret: credentials.clientSecret,
callbackURL: callbackURL,
passReqToCallback: true
},
function(request, accessToken, refreshToken, profile, done) {
var userProfile = {
id: profile.id || "",
name: profile.displayName || "",
username: profile.username || profile.id || "",
email: profile.email || "",
givenName: profile.name.givenName || "",
familyName: profile.name.familyName || "",
provider: "google"
};
return done(null, userProfile);
}
));
};
module.exports = {
passport: passport,
setCredentials: setCredentials
};
```
And the result is that when the strategy is configured, it goes back to the login page with "An error occurred" message. Also, it's important to note that Microsoft deprecated the old WindowsLive API login, as of May 2019. They have replaced it with the Azure API login. I tried both with the same results.