1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-04 08:50:19 +01:00

key not required in order to be considered logged in

This commit is contained in:
Kyle Spearrin 2016-10-21 23:00:12 -04:00
parent 8e620849ce
commit 25fef2d826

View File

@ -103,20 +103,13 @@ function initUserService() {
} }
var self = this; var self = this;
self.cryptoService.getKey(false, function (key) { self.tokenService.getToken(function (token) {
if (!key) { if (!token) {
callback(false); callback(false);
} }
else { else {
self.tokenService.getToken(function (token) { self.getUserId(function (userId) {
if (!token) { callback(userId !== null);
callback(false);
}
else {
self.getUserId(function (userId) {
callback(userId !== null);
});
}
}); });
} }
}); });
@ -128,20 +121,13 @@ function initUserService() {
} }
var self = this; var self = this;
self.cryptoService.getKey(false, function (key) { self.tokenService.getToken(function (token) {
if (!key) { if (!token) {
callback(false); callback(false);
} }
else { else {
self.tokenService.getToken(function (token) { self.getUserId(function (userId) {
if (!token) { callback(userId === null);
callback(false);
}
else {
self.getUserId(function (userId) {
callback(userId === null);
});
}
}); });
} }
}); });