mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
Added refresh token check for each API call. refactored logout messaging from authService
This commit is contained in:
@@ -190,7 +190,7 @@
|
||||
params: { animation: null }
|
||||
});
|
||||
})
|
||||
.run(function ($rootScope, userService, authService, cryptoService, tokenService, $state, constantsService, stateService) {
|
||||
.run(function ($rootScope, userService, cryptoService, tokenService, $state, constantsService, stateService) {
|
||||
$rootScope.$on('$stateChangeStart', function (event, toState, toParams) {
|
||||
if ($state.current.name.indexOf('tabs.') > -1 && toState.name.indexOf('tabs.') > -1) {
|
||||
stateService.purgeState();
|
||||
@@ -220,9 +220,7 @@
|
||||
|
||||
if (!isAuthenticated || tokenService.isTokenExpired()) {
|
||||
event.preventDefault();
|
||||
authService.logOut(function () {
|
||||
$state.go('home');
|
||||
});
|
||||
chrome.runtime.sendMessage({ command: 'logout' });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user