1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-04 05:08:06 +02:00
bitwarden-browser/libs
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
..
.vscode Multi root workspace tweaks (#2858) 2022-06-13 21:39:36 -05:00
admin-console create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
angular [PM-6688] Use AccountService as account source (#8893) 2024-04-30 09:13:02 -04:00
auth [PM-6688] Use AccountService as account source (#8893) 2024-04-30 09:13:02 -04:00
billing create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
common [PM-6688] Use AccountService as account source (#8893) 2024-04-30 09:13:02 -04:00
components Run npm run prettier (#8950) 2024-04-27 12:37:19 -04:00
importer [PM-5735] Create kdf Service (#8715) 2024-04-25 11:26:01 -07:00
node [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
platform create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
shared [AC-2356] Use safeProvider in web core services module (#8521) 2024-04-08 07:59:12 +10:00
tools [PM-5735] Create kdf Service (#8715) 2024-04-25 11:26:01 -07:00
vault [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00