From daf20bbf572b00fe59352d2632e4c1ecc478073d Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Tue, 16 Nov 2021 13:34:06 +0100 Subject: [PATCH] Do not prompt for new login if user is not logged in --- src/background/notification.background.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/background/notification.background.ts b/src/background/notification.background.ts index 6024da710be..6a5ac80d34b 100644 --- a/src/background/notification.background.ts +++ b/src/background/notification.background.ts @@ -184,6 +184,10 @@ export default class NotificationBackground { } private async addLogin(loginInfo: AddLoginRuntimeMessage, tab: chrome.tabs.Tab) { + if (!await this.userService.isAuthenticated()) { + return; + } + const loginDomain = Utils.getDomain(loginInfo.url); if (loginDomain == null) { return; @@ -194,7 +198,7 @@ export default class NotificationBackground { normalizedUsername = normalizedUsername.toLowerCase(); } - if (await this.userService.isAuthenticated() && await this.vaultTimeoutService.isLocked()) { + if (await this.vaultTimeoutService.isLocked()) { if (!await this.allowPersonalOwnership()) { return; }