mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
logout callback is always available
This commit is contained in:
@@ -374,11 +374,7 @@ export default class ApiService {
|
|||||||
|
|
||||||
private async handleError(response: Response, tokenError: boolean): Promise<ErrorResponse> {
|
private async handleError(response: Response, tokenError: boolean): Promise<ErrorResponse> {
|
||||||
if ((tokenError && response.status === 400) || response.status === 401 || response.status === 403) {
|
if ((tokenError && response.status === 400) || response.status === 401 || response.status === 403) {
|
||||||
if (this.logoutCallback) {
|
|
||||||
this.logoutCallback(true);
|
this.logoutCallback(true);
|
||||||
} else {
|
|
||||||
chrome.runtime.sendMessage({ command: 'logout', expired: true });
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user