login fixed
This commit is contained in:
@@ -13,12 +13,12 @@ module.exports = function(app, io, authentication) {
|
||||
authenticate: function (socket, data, callback) {
|
||||
console.log("=> authenticate: ", data.username);
|
||||
authentication(data.username, data.password,
|
||||
function() {
|
||||
console.log("####LOGIN-SUCESS####");
|
||||
function(username) {
|
||||
console.log("user logged in", username);
|
||||
callback(null, true)
|
||||
},
|
||||
function() {
|
||||
console.log("####LOGIN-FAIL####");
|
||||
function(username, where, err) {
|
||||
console.log("login failed", username, where, err);
|
||||
callback(new Error("wrong credentials"))
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user