1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-25 12:15:18 +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;
self.cryptoService.getKey(false, function (key) {
if (!key) {
self.tokenService.getToken(function (token) {
if (!token) {
callback(false);
}
else {
self.tokenService.getToken(function (token) {
if (!token) {
callback(false);
}
else {
self.getUserId(function (userId) {
callback(userId !== null);
});
}
self.getUserId(function (userId) {
callback(userId !== null);
});
}
});
@ -128,20 +121,13 @@ function initUserService() {
}
var self = this;
self.cryptoService.getKey(false, function (key) {
if (!key) {
self.tokenService.getToken(function (token) {
if (!token) {
callback(false);
}
else {
self.tokenService.getToken(function (token) {
if (!token) {
callback(false);
}
else {
self.getUserId(function (userId) {
callback(userId === null);
});
}
self.getUserId(function (userId) {
callback(userId === null);
});
}
});