Upgrade Angular to v19 using the update guide.
- Add `standalone: false` to any missed component in stories or tests.
- Update jest.config to follow the new best practices.
* Get userId from response if available
This is a small improvement for the Auth team which avoids inspection of the access token, sometimes.
* Initialize sdk clients with a userId
* return both Cipher and encryptedFor when encrypting a cipher
Update cipher api requests to include encryptedFor attribute
* Prefer named types with documentation
* Update sdk to latest
* Fixup types
* Fixup tests
* Revert getting userId from identity token response
---------
Co-authored-by: Shane <smelton@bitwarden.com>
* first draft at an idea dependency graph
* ignore existing errors
* remove conflicting rule regarding internal platform logic in libs
* review: allow components to import from platform
* added generator spotlight to credential generator component
* moved generator spotlight to browser component and add as slot in libs. update copy for send
* added an aria label for the generator nudge body content
* new copy and styles for browser send will be behind feature flag
* update featureflag call to observable in send-v2
* changed how nudge text is made in credential generator
* added new observable to vault nudges to return specific boolean. Update naming of vault types. update observable calls in credential-generator and send-v2
* update send-v2 and credential generator to use new renamed nudges
* update to create nudge generator spotlight component. using this inside the credential generator for nudge spotlight
* fix imports for Nudge related code
* add libs/angular to storybook
---------
Co-authored-by: Nick Krantz <nick@livefront.com>
* account security nudge
* fix messages.json
* fix tests
* fix logic for account security item
* fix tests
* adjust account security nudge work to updated nudge service
* fix account security nudge
* remove unused code. do not show account security badge
* include ff and safari in link html
* fix import
* Revert "include ff and safari in link html"
This reverts commit cd12a36274.
* Passed in userId on RemovePasswordComponent.
* Added userId on other references to KeyConnectorService methods
* remove password component refactor, test coverage, enabled strict
* explicit user id provided to key connector service
* redirect to / instead when user not logged in or not managing organization
* key connector service explicit user id
* key connector service no longer requires account service
* key connector service missing null type
* cli convert to key connector unit tests
* remove unnecessary SyncService
* error toast not showing on ErrorResponse
* bad import due to merge conflict
* bad import due to merge conflict
* missing loading in remove password component for browser extension
* error handling in remove password component
* organization observable race condition in key-connector
* usesKeyConnector always returns boolean
* unit test coverage
* key connector reactive
* reactive key connector service
* introducing convertAccountRequired$
* cli build fix
* moving message sending side effect to sync
* key connector service unit tests
* fix unit tests
* unit tests in wrong place after KM code ownership move
* infinite page reload
* failing unit tests
* failing unit tests
---------
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
This PR creates a new ChangePasswordComponent. The first use-case of the ChangePasswordComponent is to place it inside a new PasswordSettingsComponent, which is accessed by going to Account Settings > Security.
The ChangePasswordComponent will be updated in future PRs to handle more change password scenarios.
Feature Flags: PM16117_ChangeExistingPasswordRefactor
* Created mappings for client domain object to SDK
* Add abstract decrypt observable
* Added todo for future consideration
* Added implementation to cipher service
* Added adapter and unit tests
* Created cipher encryption abstraction and service
* Register cipher encryption service
* Added tests for the cipher encryption service
* changed signature
* Updated feature flag name
* added new function to be used for decrypting ciphers
* Added new encryptedKey field
* added new function to be used for decrypting ciphers
* Manually set fields
* Added encrypted key in attachment view
* Fixed test
* Updated references to use decrypt with feature flag
* Added dependency
* updated package.json
* lint fix
* fixed tests
* Fixed small mapping issues
* Fixed test
* Added function to decrypt fido2 key value
* Added function to decrypt fido2 key value and updated test
* updated to use sdk function without prociding the key
* updated localdata sdk type change
* decrypt attachment content using sdk
* Fixed dependency issues
* updated package.json
* Refactored service to handle getting decrypted buffer using the legacy and sdk implementations
* updated services and component to use refactored version
* Updated decryptCiphersWithSdk to use decryptManyLegacy for batch decryption, ensuring the SDK is only called once per batch
* Fixed merge conflicts
* Fixed merge conflicts
* Fixed merge conflicts
* Fixed lint issues
* Moved getDecryptedAttachmentBuffer to cipher service
* Moved getDecryptedAttachmentBuffer to cipher service
* ensure CipherView properties are null instead of undefined
* Fixed test
* ensure AttachmentView properties are null instead of undefined
* Linked ticket in comment
* removed unused orgKey
* fix(enums-eslint): Enum Rule for ESLint - Added enums in the warnings for eslint.
* fix(enums-eslint): Enum Rule for ESLint - Updated to error in both places for enums.
* fix(enums-eslint): Enum Rule for ESLint - Added new eslint plugin for warning on enums.
* fix(enums-eslint): Enum Rule for ESLint - Changed based on suggestion.
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* refactor(browser-platform-utils): Remove Deprecation and Fix Code - Changed usages of firefox to private and moved the usages to the preferred public method and removed the deprecations.
* fix(enums-eslint): Enum Rule for ESLint - Updated to error and added disable rules for all other places.
* fix(enums-eslint): Enum Rule for ESLint - Undid other changes by accident
* Consolidates component routing, removing routing to update-temp-password from components. All routing to update-temp-password should happen in the AuthGuard now.
---------
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
* [CL-571] Update icons to new fileset and metaphors (#14163)
* [CL-518] Convert icons docs to stories (#14299)
* [CL-574] Update inline autofill icons (#14379)
---------
Co-authored-by: William Martin <contact@willmartian.com>
* remove NewDeviceVerificationGuard and all associated entities. New Device verification feature has rolled out in production, this guard is no longer needed.
* remove unused properties from the vault profile service
* Improve dev logging
* Define decrypt with sdk flag
* Use SDK's pure crypto functions for decryption
feature flagged by `use-sdk-for-decryption`
* Avoid pushing decryption requests to web workers for SDK
web workers are able to use the SDK, but they require the SDK module to be initialized. If this is eventually seen as desired, we'll need client-specific worker scripts.
* Apply suggestions from code review
Co-authored-by: Bernd Schoolmann <mail@quexten.com>
* fixup! Apply suggestions from code review
* fixup: Update feature flag state in config callbacks
* Apply suggestions from code review
Co-authored-by: Bernd Schoolmann <mail@quexten.com>
---------
Co-authored-by: Bernd Schoolmann <mail@quexten.com>
* Added nav item for f4e in org admin console
* shotgun surgery for adding "useAdminSponsoredFamilies" feature from the org table
* Resolved issue with members nav item also being selected when f4e is selected
* Separated out billing's logic from the org layout component
* Removed unused observable
* Moved logic to existing f4e policy service and added unit tests
* Resolved script typescript error
* Resolved goofy switchMap
* Add changes for the issue orgs
* Added changes for the dialog
* Rename the files properly
* Remove the commented code
* Change the implement to align with design
* Add todo comments
* Remove the comment todo
* Fix the uni test error
* Resolve the unit test
* Resolve the unit test issue
* Resolve the pr comments on any and route
* remove the any
* remove the generic validator
* Resolve the unit test
* add validations for email
* Add changes for the autoscale
* Changes to allow admin to send F4E sponsorship
* Fix the lint errors
* Resolve the lint errors
* Fix the revokeAccount message
* Fix the lint runtime error
* Resolve the lint issues
* Remove unused components
* Changes to add isadminInitiated
* remove the FIXME comment
* Resolve the failing test
* Fix the pr comments
* Resolve the orgkey and other comments
* Resolve the lint error
* Resolve the lint error
* resolve the spelling error
* refactor the getStatus method
* Remove the deprecated method
* Resolve the unusual type casting
* revert the change
---------
Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
* [PM-10611] Remove Angular dependencies from Notifications module
* [PM-10611] Move end user notification service to /libs/common/vault/notifications
* [PM-10611] Implement listenForEndUserNotifications() for EndUserNotificationService
* [PM-10611] Add missing taskId to notification models
* [PM-10611] Add switch cases for end user notification payloads
* [PM-10611] Mark task related notifications as read when visiting the at-risk password page
* [PM-10611] Revert change to default-notifications service
* [PM-10611] Fix test
* [PM-10611] Fix tests and log warning in case more notifications than the default page size are available
* [PM-10611] Use separate feature flag for end user notifications
* [PM-10611] Fix test
* [PM-13128] Enable Breadcrumb Policies
* [PM-13128] Enable Breadcrumb Policies
* [PM-13128] wip
* [PM-13128] wip
* [PM-13128] wip
* [PM-13128] wip
* remove dead code
* wip
* wip
* wip
* refactor
* Fix for providers
* revert to functional auth guard
* change prerequisite to info variant
* address comment
* r
* r
* r
* tests
* r
* r
* fix tests
* feedback
* fix tests
* fix tests
* Rename upselling to breadcrumbing
* Address feedback
* Fix build & tests
* Make the guard callback use Observable instead of a promise
* Pm 13128 suggestions (#14041)
* Rename new enum value
* Show the upgrade button when breadcrumbing is enabled
* Show mouse pointer when cursor is hovered above badge
* Do not make the dialogs overlap
* Align badge middle
* Gap
* Badge should be a `button` instead of `span`
* missing button@type
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Alex Morask <amorask@bitwarden.com>
* [PM-18707] Use different BroadcasterSubscriptionId in base view component to avoid collision with desktop view component
* [PM-18707] Use userId instead of payloadUserId for cipher notification syncs
* [PM-19032] Live Sync on Desktop (#13851)
* migrate the vault-items to an observables rather than async/promises
- this helps keep data in sync with the service state and avoids race conditions
* migrate the view component to an observables rather than async/promises
- this helps keep data in sync with the service state and avoids race conditions
* decrypt saved cipher from server
* bump timeout for upserting ciphers
* mark `go` as async in desktop vault
- previously it was a floating promise
* Revert "mark `go` as async in desktop vault"
This reverts commit fd28f40b18.
* Revert "bump timeout for upserting ciphers"
This reverts commit e963acc377.
* move vault utilities to `common` rather than `lib` to avoid circular dependencies
* use `perUserCache$` for `cipherViews$` to avoid new subscriptions from being created
* use userId from observable rather than locally set to be the most up to date
* [PM-18707] Add clearBuffer$ input to perUserCache$ helper so that the internal share replay buffers can be cleared
* [PM-18707] Rework forceCipherViews$ to clearBuffer$ refactor
- Add dependency for cipherDecryptionKeys$ for the cipherViews so that decryption is never attempted without keys
* [PM-18707] Add overload to perUserCache to satisfy type checker
* [PM-18707] Fix overloads
* [PM-18707] Add check for empty failed to decrypt ciphers
* [PM-18707] Mark vault component for check after observable emits.
The cipherViews$ observable now persists between subscriptions, meaning that updates via the sync push notifications can occur outside the AngularZone causing delays in updating the view.
---------
Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
Co-authored-by: Nick Krantz <nick@livefront.com>
* Moved saving of SSO email outside of browser/desktop code
* Clarified comments.
* Tests
* Refactored login component services to manage state
* Fixed input on login component
* Fixed tests
* Linting
* Moved web setting in state into web override
* updated tests
* Fixed typing.
* Fixed type safety issues.
* Added comments and renamed for clarity.
* Removed method parameters that weren't used
* Added clarifying comments
* Added more comments.
* Removed test that is not necessary on base
* Test cleanup
* More comments.
* Linting
* Fixed test.
* Fixed base URL
* Fixed typechecking.
* Type checking
* Moved setting of email state to default service
* Added comments.
* Consolidated SSO URL formatting
* Updated comment
* Fixed reference.
* Fixed missing parameter.
* Initialized service.
* Added comments
* Added initialization of new service
* Made email optional due to CLI.
* Fixed comment on handleSsoClick.
* Added SSO email persistence to v1 component.
* Updated login email service.
* Updated setting of remember me
* Removed unnecessary input checking and rearranged functions
* Fixed name
* Added handling of Remember Email to old component for passkey click
* Updated v1 component to persist the email on Continue click
* Fix merge conflicts.
* Merge conflicts in login component.
* Persisted login email on v1 browser component.
* Merge conflicts
* fix(snap) [PM-17464][PM-17463][PM-15587] Allow Snap to use custom callback protocol
* Removed Snap from custom protocol workaround
* Fixed tests.
* Updated case numbers on test
* Resolved PR feedback.
* PM-11502 - LoginEmailSvcAbstraction - mark methods as abstract to satisfy strict ts.
* Removed test
* Changed to persist on leaving fields instead of button click.
* Fixed type checking.
---------
Co-authored-by: Bernd Schoolmann <mail@quexten.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
This PR
- Moves the `compareInputs` validator to `libs/auth` (with some minor updates to the validator)
- Adds unit tests for `compareInputs`
- Removes the deprecated input validators from `InputsFieldMatch` along with the `inputs-field-match.validator.ts` file
- Move the `compareInputs` validator to `libs/auth`
- Add tests for the `compareInputs` validator
- Delete the deprecated `InputsFieldMatch` class (inputs-field-match.validator.ts)
* set pin validation to min length of 4
* use reactive forms
* PM-8951 - SetPin - remove dialog close logic if pin is invalid so validation errors can be shown to the user.
---------
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
* [PM-17563] Implement listenForTaskNotifications in default-task.service.ts
* [PM-17563] Update syncService to include userId in syncCompleted message payload
* [PM-17563] Update default-task.service to react to both pending task notifications and completed syncs
* [PM-17563] Add unit tests around task notification listening
* [PM-17563] Only check for at risk password tasks if tasks are enabled
* [PM-17563] Make userId required even if undefined
* [PM-17563] Use abstract TaskService instead of default implementation in MainBackground
* [PM-17563] Cleanup userId filtering
* feat(device-approval-persistence): [PM-19380] Device Approval Persistence - Added lookup on standard auth requests.
* fix(device-approval-persistence): [PM-19380] Device Approval Persistence - Fixed issue with null value trying to be parsed from the fromJSON function.
---------
Co-authored-by: Todd Martin <tmartin@bitwarden.com>