1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

clear vault upon logout. full sync vault upon login.

This commit is contained in:
Kyle Spearrin
2016-09-21 00:04:59 -04:00
parent 8b76668f1f
commit 2e56a956db
7 changed files with 86 additions and 40 deletions

View File

@@ -186,6 +186,17 @@ function initSiteService() {
});
};
SiteService.prototype.clear = function (userId, callback) {
if (!callback || typeof callback !== 'function') {
throw 'callback function required';
}
chrome.storage.local.remove('sites_' + userId, function () {
self.decryptedSiteCache = null;
callback();
});
};
SiteService.prototype.delete = function (id, callback) {
if (!callback || typeof callback !== 'function') {
throw 'callback function required';