1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-14 10:26:19 +01:00
bitwarden-browser/apps/browser/src/popup
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
..
components [PM-6328] Checkmarx - Resolve warnings (#7941) 2024-02-15 16:25:53 -05:00
images [PM-1222] Store passkeys in Bitwarden vault (#4715) 2023-10-17 15:34:44 -04:00
scss [CL-219][CL-218][CL-217] Add new extension layout components (#8728) 2024-04-26 09:35:32 -04:00
services [PM-7766] Add clientType to MigrationHelper (#8945) 2024-04-29 07:28:58 -04:00
settings pass userId when logging out and add error handling if one isn't found in background (#8946) 2024-04-26 18:02:45 -04:00
app-routing.animations.ts [PM-194] Browser Account Switcher UI (#6772) 2023-12-06 09:22:48 -08:00
app-routing.module.ts [PM-2260] Remove TDE feature flag and all conditional logic based on it (#7352) 2024-01-10 12:33:11 -05:00
app.component.ts [PM-6688] Use AccountService as account source (#8893) 2024-04-30 09:13:02 -04:00
app.module.ts [CL-219][CL-218][CL-217] Add new extension layout components (#8728) 2024-04-26 09:35:32 -04:00
index.html [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
main.ts Ps/pm-6636/angular-specific-browser-platform-utils (#8211) 2024-03-12 11:25:03 -04:00
polyfills.ts [PM-4401] Re-add manual ngZone.run execution (#6647) 2023-10-20 11:41:26 -05:00
tabs.component.html [PS-1182] Desktop / Browser: Accessibility - remove appBlurClick, change remaining links to buttons (#2662) 2022-07-25 12:43:10 +02:00
tabs.component.ts [PM-3914] Refactor Browser Extension Popout Windows (#6296) 2023-11-08 12:57:44 -06:00