1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-12 14:56:58 +01:00
bitwarden-browser/apps/web/src/app/core
Matt Gibson cdcd1809f0
Expand account service (#6622)
* Define account service observable responsibilities

* Establish account service observables and update methods

* Update Account Service observables from state service

This is a temporary stop-gap to avoid needing to reroute all account
activity and status changes through the account service. That can be
done as part of the breakup of state service.

* Add matchers for Observable emissions

* Fix null active account

* Test account service

* Transition account status to account info

* Remove unused matchers

* Remove duplicate class

* Replay active account for late subscriptions

* Add factories for background services

* Fix state service for web

* Allow for optional messaging

This is a temporary hack until the flow of account status can be
reversed from state -> account to account -> state. The foreground
account service will still logout, it's just the background one cannot
send messages

* Fix add account logic

* Do not throw on recoverable errors

It's possible that duplicate entries exist in `activeAccounts` exist
in the wild. If we throw on adding a duplicate account this will cause
applications to be unusable until duplicates are removed it is not
necessary to throw since this is recoverable. with some potential loss
in current account status

* Add documentation to abstraction

* Update libs/common/spec/utils.ts

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Fix justin's comment :fist-shake:

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2023-10-19 15:41:01 -04:00
..
guards Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
state Expand account service (#6622) 2023-10-19 15:41:01 -04:00
tests Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
broadcaster-messaging.service.ts Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
core.module.ts [PM-2169] Update Password Reprompt Modal to use Component Library (#5720) 2023-10-04 22:56:27 -04:00
event.service.ts Trusted Device Encryption feature (#5950) 2023-08-18 14:05:08 -04:00
html-storage.service.ts Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
i18n.service.ts Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
index.ts refactor: remove unscoped file from core index and update references, refs PM-2491 (#5566) 2023-06-05 14:12:01 -05:00
init.service.ts [AC-1479][BEEEP] Refactor ConfigService to improve observable usage (#5602) 2023-09-08 10:05:37 -04:00
modal.service.ts Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
router.service.ts for secrets manager show SM title (#5780) 2023-07-27 00:53:09 +00:00
web-file-download.service.ts Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
web-platform-utils.service.spec.ts [EC-584] Update ApiService to remove any appendages to ClientVersion (#4008) 2022-12-02 19:38:12 +00:00
web-platform-utils.service.ts Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00