1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-06 00:03:29 +00:00

[bug] Fix logout timeout action for inactive accounts (#660)

* [bug] Fix logout timeout action for inactive accounts

* Pass userId in to the logout callback parameter to the vaultTimeoutService. The message handle in desktop already expects this.
* Set lastActive on account login, and null it on account deauthentication. This prevents an issue where newly logged in accounts immediatly time out due to inactivity.

* Add userId to locked callbacks

* Add userId to log out callback
This commit is contained in:
Addison Beck
2022-02-09 12:15:20 -05:00
committed by GitHub
parent 8cb029947b
commit c282ef8575
3 changed files with 8 additions and 5 deletions

View File

@@ -313,7 +313,8 @@ import { StateFactory } from "jslib-common/factories/stateFactory";
keyConnectorService,
stateService,
null,
async () => messagingService.send("logout", { expired: false })
async (userId?: string) =>
messagingService.send("logout", { expired: false, userId: userId })
),
deps: [
CipherServiceAbstraction,