Display feedback message after login

This commit is contained in:
Juan Cruz Viotti 2015-06-02 11:57:52 -04:00
parent 806678ee5f
commit 34736c4e9b
2 changed files with 14 additions and 2 deletions

View File

@ -35,7 +35,12 @@
return visuals.widgets.ask('What\'s your token? (visible in the preferences page)', null, callback);
});
}, function(token, callback) {
return resin.auth.loginWithToken(token, done);
return resin.auth.loginWithToken(token, callback);
}, function(callback) {
return resin.auth.whoami(callback);
}, function(username, callback) {
console.info("Successfully logged in as: " + username);
return callback();
}
], done);
}

View File

@ -47,7 +47,14 @@ exports.login =
visuals.widgets.ask('What\'s your token? (visible in the preferences page)', null, callback)
(token, callback) ->
resin.auth.loginWithToken(token, done)
resin.auth.loginWithToken(token, callback)
(callback) ->
resin.auth.whoami(callback)
(username, callback) ->
console.info("Successfully logged in as: #{username}")
return callback()
], done)