1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-08-26 23:09:46 +02:00
bitwarden-browser/libs/common/spec
Matt Gibson c70a5aa024
[PM-6688] Use AccountService as account source (#8893)
* Use account service to track accounts and active account

* Remove state service active account Observables.

* Add email verified to account service

* Do not store account info on logged out accounts

* Add account activity tracking to account service

* Use last account activity from account service

* migrate or replicate account service data

* Add `AccountActivityService` that handles storing account last active data

* Move active and next active user to account service

* Remove authenticated accounts from state object

* Fold account activity into account service

* Fix builds

* Fix desktop app switch

* Fix logging out non active user

* Expand helper to handle new authenticated accounts location

* Prefer view observable to tons of async pipes

* Fix `npm run test:types`

* Correct user activity sorting test

* Be more precise about log out messaging

* Fix dev compare errors

All stored values are serializable, the next step wasn't necessary and was erroring on some types that lack `toString`.

* If the account in unlocked on load of lock component, navigate away from lock screen

* Handle no users case for auth service statuses

* Specify account to switch to

* Filter active account out of inactive accounts

* Prefer constructor init

* Improve comparator

* Use helper methods internally

* Fixup component tests

* Clarify name

* Ensure accounts object has only valid userIds

* Capitalize const values

* Prefer descriptive, single-responsibility guards

* Update libs/common/src/state-migrations/migrate.ts

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

* Fix merge

* Add user Id validation

activity for undefined was being set, which was resulting in requests for the auth status of `"undefined"` (string) userId, due to key enumeration. These changes stop that at both locations, as well as account add for good measure.

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-04-30 09:13:02 -04:00
..
matchers Ps/pm 5965/better config polling (#8325) 2024-03-27 10:03:09 -07:00
fake-account-service.ts [PM-6688] Use AccountService as account source (#8893) 2024-04-30 09:13:02 -04:00
fake-state-provider.ts Remove memory storage cache from derived state. Use observable cache and port messaging (#8939) 2024-04-26 15:08:39 -04:00
fake-state.ts [PM-6404] Fully Integrate clearOn Events (#8134) 2024-03-04 20:33:25 +00:00
fake-storage.service.ts Add eslint rule no-floating-promises (#7789) 2024-02-02 15:13:37 -05:00
index.ts Remove memory storage cache from derived state. Use observable cache and port messaging (#8939) 2024-04-26 15:08:39 -04:00
intercept-console.ts [PM-2132] Move all specs to the src directory (#5367) 2023-05-09 11:27:09 +02:00
observable-tracker.ts Signed-off-by: findseat <penglili@outlook.com> (#8636) 2024-04-27 15:15:27 +00:00
utils.ts [PM-5537] Biometric State Service (#7761) 2024-02-05 13:02:28 -05:00