* refactor(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - First pass of work to update the state. In the middle of testing.
* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Fix for jslib-services.module.ts
* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Fix main.background.ts
* test(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Added simple tests
* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Tiny touchups.
* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Few fixes to resolve comments.
* fix(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Changed place where userId is loaded.
* test(active-user-state-refactor): [PM-12040] Remove ActiveUserState from SSO Service - Fixed test.
* feat(newdeviceVerificaiton) : adding component and request model
* feat(newDeviceverification) : adding state structure to track verify devices for active user; added API call to server.
* feat(newDeviceVerification) : added visual elements for opting out of new device verification.
* Fixing tests for account service.
fixed DI for account service
* Fixing strict lint issues
* debt(deauthorizeSessionsModal) : changed modal to dialog. fixed strict typing for the new dialog for deviceVerification.
* fixing tests
* fixing desktop build DI
* changed dialog to standalone fixed names and comments.
* Adding tests for AccountService
* fix linting
* PM-15605 - AccountComp - fix ngOnDestroy erroring as it was incorrectly decorated with removed property.
* PM-15605 - SetAccountVerifyDevicesDialogComponent - only show warning about turning off new device verification if user doensn't have 2FA configured per task description
---------
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
* WIP: PoC with lots of terrible code with web push
* fix service worker building
* Work on WebPush Tailored to Browser
* Clean Up Web And MV2
* Fix Merge Conflicts
* Prettier
* Use Unsupported for MV2
* Add Doc Comments
* Remove Permission Button
* Fix Type Test
* Write Time In More Readable Format
* Add SignalR Logger
* `sheduleReconnect` -> `scheduleReconnect`
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Capture Support Context In Connector
* Remove Unneeded CSP Change
* Fix Build
* Simplify `getOrCreateSubscription`
* Add More Docs to Matrix
* Update libs/common/src/platform/notifications/internal/worker-webpush-connection.service.ts
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Move API Service Into Notifications Folder
* Allow Connection When Account Is Locked
* Add Comments to NotificationsService
* Only Change Support Status If Public Key Changes
* Move Service Choice Out To Method
* Use Named Constant For Disabled Notification Url
* Add Test & Cleanup
* Flatten
* Move Tests into `beforeEach` & `afterEach`
* Add Tests
* Test `distinctUntilChanged`'s Operators More
* Make Helper And Cleanup Chain
* Add Back Cast
* Add extra safety to incoming config check
* Put data through response object
* Apply TS Strict Rules
* Finish PushTechnology comment
* Use `instanceof` check
* Do Safer Worker Based Registration for MV3
* Remove TODO
* Switch to SignalR on any WebPush Error
* Fix Manifest Permissions
* Add Back `webNavigation`
* Sorry, Remove `webNavigation`
* Fixed merge conflicts.
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
* update extension refresh form when an attachment is added or removed
- This is needed because the revision date was updated on the server and the locally stored cipher needs to match.
* receive updated cipher from delete attachment endpoint
- deleting an attachment will now alter the revision timestamp on a cipher.
* patch the cipher when an attachment is added or deleted
* migrate vault component to use the `cipherViews$` observable
* reference `cipherViews$` on desktop for vault-items
- This avoid race conditions where ciphers are cleared out in the background. `cipherViews` should always emit the latest views
* return CipherData from cipher service so that consumers have the updated cipher right away
* use the updated cipher from attachment endpoints to refresh the details within the add/edit components on desktop
The legacy config is deprecated and will be removed in eslint 10. The flat config also allows us to write js functions which will assist in handling limitations with multiple identical rules.
Wait for an account to become available from separate observable, instead of blindly accepting that the value is there using `firstValueFrom`, while it's sometimes not there immediately.
* PM-17197 - Refactor DeviceTrustService to deprecate active user state as I need to call with a user id per latest best practice
* PM-17197 - Refactor Unauth Guard to be aware of TDE lock state + use active user best practice.
* [PM-17541] Switch folder key definition back to "folders" and add migration script for users that have switched to the incorrect key
* [PM-17541] Fix import path
* [PM-17541] Fix implicit any in spec file
* refactor PolicyService.getAll$ to make userId not optional
* add fix to browser
* fix test to read from mock singleUserState
* remove nested pipes, cleanup
* allow changing of item owner from personal to org
* avoid unecessary api calls when updating item parent
* move comment up a line
* add localData to cipher instance
* create service to load sdk on application init
* Eagerly load CLI SDK
* Remove wasm logging to api
* Fix imports
* Eagerly load Desktop renderer SDK
Note: If the main process ever requires an SDK, we'll need to load it there, too.
In that event, it's probably a good idea to move to IPC for all SDK functions to avoid
loading the SDK for every window.
* init wasm module from sdk load service
* Use default client factory
* Fix type imports
* Resolve jest module import errors
A CLI sdk load service that async imports our wasm binary doesn't seem to be needed to run, but jest isn't dealing with the ESM import properly.
* Fix linting
* remove example code
Add device verification flow that requires users to enter an OTP when logging in from an unrecognized device. This includes:
- New device verification route and guard
- Email OTP verification component
- Authentication timeout handling
PM-8221
* [PM-15506] Wire up vNextOrganizationService for libs/common and libs/angular (#12683)
* Wire up vNextOrganizationService in PolicyService
* Wire vNextOrganizationService in SyncService
* wire vNextOrganizationService for EventCollectionService
* wire vNextOrganizationService for KeyConnectorService
* wire up vNextOrganizationService for CipherAuthorizationService
* Wire up vNextOrganizationService in PolicyService
* Wire vNextOrganizationService in SyncService
* wire vNextOrganizationService for EventCollectionService
* wire vNextOrganizationService for KeyConnectorService
* wire up vNextOrganizationService for CipherAuthorizationService
* wire vNextOrganizationService for share.component
* wire vNextOrganizationService for collections.component
* wire vNextOrganizationServcie for add-account-credit-dialog
* wire vNextOrganizationService for vault-filter.service
* fix browser errors for vNextOrganizationService implementation in libs
* fix desktop errors for vNextOrganizationService implementation for libs
* fix linter errors
* fix CLI errors on vNextOrganizationServcie implementations for libs
* [PM-15506] Wire up vNextOrganizationService for web client (#12810)
PR to a feature branch, no need to review until this goes to main.
* implement vNextOrganization service for browser client (#12844)
PR to feature branch, no need for review yet.
* wire vNextOrganizationService for licence and some web router guards
* wire vNextOrganizationService in tests
* remove vNext notation for OrganizationService and related
* Merge branch 'main' into ac/pm-15506-vNextOrganizationService
* fix tsstrict error
* fix test, fix ts strict error
* remove todo
* Retrieve cache cipher for add-edit form
* user prefilled cipher for add-edit form
* add listener for clearing view cache
* clear local cache when clearing global state
* track initial value of cache for down stream logic that should only occur on non-cached values
* add feature flag for edit form persistence
* add tests for cipher form cache service
* fix optional initialValues
* add services to cipher form storybook
* fix strict types
* rename variables to be platform agnostic
* use deconstructed collectionIds variable to avoid them be overwritten
* use the originalCipherView for initial values
* add comment about signal equality
* prevent events from being emitted when adding uris to the existing form
- This stops other values from being overwrote in the initialization process
* add check for cached cipher when adding initial uris
Extract core functionality from `libs/angular` to allow teams to depend on `libs/ui-common` instead.
Moves the following functionality to `ui-common`.
- `I18nPipe`. `libs/angular` still has an old copy but `components` depends on the new variant from `ui-common`.
- `safeProvider`, `SafeProvider` and `SafeInjectionToken`. `libs/angular`re-exports these to avoid needing to update all consumers.
* Remove LP fileless importer
- Remove content scripts
- Remove additions to message handlers and notifcation queue
- Remove UI elements for the importer
- Remove the actual importer code
- Remove unsued keys from en/messages.json
Remove feature flag "browser-fileless-
import"
Update webpack.config and manifest files to no longer include content scripts
* Move feature flag idp-auto-submit-login under autofill grouping
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Bug fix for PM-15914 where switching users would incorrectly share cached
derived states. The `DerivedStateProvider` now uses a `WeakMap` to maintain
separate caches for each user's state `Observable`.
- Modifies `DefaultDerivedStateProvider` to use `WeakMap` for caching
- Each user's state `Observable` gets its own definition cache
- Added test to verify correct behavior during user switching
- Allows proper garbage collection of unused state caches
This fixes issues where:
- Users would see other users' cached states after switching accounts
- Derived states weren't properly isolated between users
- Cache keys didn't distinguish between different user states
* Fix biometrics not working in firefox or windows
* Remove logs
* Update badge after biometric unlock
* Add removal todo note
* Remove debug logging
* Fix type warnings
* Fix userkey typing in background biometrics service
* Simplify types for userkey in foreground-browser-biometrics and runtime.background.ts
* Add process reload logging
* Fix autoprompt not working when no process reload happened
* Fix instant reprompt on firefox lock
* Fix biometrics enabling error on chrome
* Update apps/browser/src/key-management/biometrics/foreground-browser-biometrics.ts
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* FIx build & linting
---------
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
* [deps] SM: Update typescript-eslint monorepo to v8
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hinton <hinton@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* PM-16947 - JsLibServices - register default DefaultLoginApprovalComponentService
* PM-16947 - DeviceResponse - add interface for DevicePendingAuthRequest
* PM-16947 - Web translations - migrate all LoginApprovalComponent translations from desktop to web
* PM-16947 - LoginApprovalComp - (1) Add loading state (2) Refactor to return proper boolean results (3) Don't create race condition by trying to respond to the close event in the dialog and re-sending responses upon approve or deny click
* PM-16947 - DeviceManagementComponent - added support for approving and denying auth requests.
* PM-16947 - LoginApprovalComp - Add validation error
* PM-16947 - LoginApprovalComponent - remove validation service for now.
* PM-16947 - Re add validation
* PM-16947 - Fix LoginApprovalComponent tests