Commit Graph

16 Commits

Author SHA1 Message Date
Daniel James Smith bd770c90ed
[Account Switching] Base changes for account switching (#2250)
* Pull in jslib

* Create new state models

* Create browser specific stateService

* Remove registration deprecated services, register stateService

* Replace usage of deprecated services (user, constants)

* Add missing properties to BrowserGroupingsComponentState

* Remove StorageService from initFactory

* Clear the correct state

* Add null check when restoring send-grouping state

* add remember email

* Initialize stateservice in services.module

* Fix 'lock now' not working

* Comment to remove setting defaults on install

* Pull jslib

* Remove setting defaults on install

* Bump jslib

* Pass the current userId to services when logging out

* Bump jslib

* Override vaultTimeout default on account addition

* Pull latest jslib

* Retrieve vaultTimeout from stateService

* Record activity per Account

* Add userId to logout and add fallback if not present

* Register AccountFactory

* Pass userId in messages

* Base changes for account switching di fixes (#2280)

* [bug] Null checks on Account init

* [bug] Use same stateService instance for all operations

We override the stateService in browser, but currently don't pull the background service into popup and allow jslib to create its own instance of the base StateService for jslib services.
This causes a split in in memory state between the three isntances that results in many errors, namely locking not working.

* [chore] Update jslib

* Pull in jslib

* Pull in jslib

* Pull in latest jslib to multiple stateservice inits

* Check vault states before executing processReload

* Adjust iterator

* Update native messaging to include the userId (#2290)

* Re-Add UserVerificationService

* Fix email not being remembered by base component

* Improve readability of reloadProcess

* Removed unneeded null check

* Fix constructor dependency (stateService)

* Added missing await

* Simplify dependency registration

* Fixed typos

* Reverted back to simple loop

* Use vaultTimeoutService to retrieve Timeout

Co-authored-by: Addison Beck <abeck@bitwarden.com>
Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
2022-01-27 22:22:51 +01:00
Oscar Hinton 8fe821b9a3
Apply Prettier (#2238) 2021-12-21 15:43:35 +01:00
Oscar Hinton a848406ce0
Use explicit import paths (#2074) 2021-09-17 15:44:27 +02:00
Oscar Hinton 4e1958f417
Add jslib as a "real" dependency (#1876)
* Support split jslib

* Fix tests

* Bump jslib
2021-06-07 19:25:37 +02:00
Vincent Salucci e6856a52b4
Initial commit: made lock state default (#1261) 2020-05-28 13:30:11 -05:00
Vincent Salucci e510738a03
[Auto-Logout] Implement Vault Timeout Options (#1194)
* Update jslib 31a2574 -> 28e3fff

* Initial commit for vault timeout

* Updated timeout/action retrieval in idle.background

* Cycle saved for idle check

* Await async calls for lock/logout in idle bg

* Updated lock vs log out conditional

Co-authored-by: Vincent Salucci <vsalucci@bitwarden.com>
2020-04-06 10:40:16 -05:00
Kyle Spearrin ded5ace0de null check 2019-06-28 23:33:53 -04:00
Dustin Falgout 4d3ffad257 Update idle.background.ts (#961)
Handle cases where `chrome.idle` doesn't exist and there is no `browser` object either. Fixes #960
2019-06-28 23:24:38 -04:00
Kyle Spearrin f28d7a1af6 lock with master pass on restart option on PIN lock 2019-02-14 00:46:28 -05:00
Kyle Spearrin 22c991f655 disconnect and connect on idle states 2018-08-22 21:10:23 -04:00
Kyle Spearrin 7ca71cb9a1 move lock service ti jslib 2018-01-09 23:18:55 -05:00
Kyle Spearrin f20c217321 migrate constants to jslib 2018-01-09 22:22:49 -05:00
Kyle Spearrin f51bebd99a import ts through node_modules alias 2018-01-09 14:26:20 -05:00
Kyle Spearrin 03258e50f7 Refactor for barrels. Utils service to jslib 2018-01-06 22:13:48 -05:00
Kyle Spearrin c018f096b4 moved service abstractions to jslib 2018-01-06 15:47:46 -05:00
Kyle Spearrin 2ef937f333 IdleBackground, clean up lock service chrome refs 2018-01-04 17:04:26 -05:00