1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

Added refresh token check for each API call. refactored logout messaging from authService

This commit is contained in:
Kyle Spearrin
2017-01-19 00:21:20 -05:00
parent 0b63eb58ba
commit 0bd77352b0
8 changed files with 159 additions and 76 deletions

View File

@@ -1,7 +1,7 @@
angular
.module('bit.settings')
.controller('settingsController', function ($scope, authService, $state, SweetAlert, utilsService, $analytics,
.controller('settingsController', function ($scope, $state, SweetAlert, utilsService, $analytics,
i18nService, constantsService, cryptoService) {
utilsService.initListSectionItemListeners($(document), angular);
$scope.lockOption = '';
@@ -38,10 +38,7 @@
}, function (confirmed) {
if (confirmed) {
cryptoService.toggleKey(function () { });
authService.logOut(function () {
$analytics.eventTrack('Logged Out');
$state.go('home');
});
chrome.runtime.sendMessage({ command: 'logout' });
}
});
}
@@ -58,10 +55,7 @@
cancelButtonText: i18nService.cancel
}, function (confirmed) {
if (confirmed) {
authService.logOut(function () {
$analytics.eventTrack('Logged Out');
$state.go('home');
});
chrome.runtime.sendMessage({ command: 'logout' });
}
});
};