1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

1628 Commits

Author SHA1 Message Date
SmithThe4th
48c466436e Fixed cipherlistview$ to return cipherlistview (#16861) 2025-10-14 16:17:23 -04:00
Kyle Denney
e65d572401 [PM-24032] - adds a new upgrade plan button to side nav (#16687)
* feat(billing): add required messages

* feat(billing): Add upgrade from free account dialog

* feat(billing): Add payment dialog for premium upgrade

* feat(billing): Add Upgrade Payment Service

* feat(billing): Add Upgrade flow service

* feat(billing): Add purchase premium subscription method to client

* fix(billing): allow for nullable taxId for families organizations

* fix(billing): Fix Cart Summary Tests

* temp-fix(billing): add currency pipe to pricing card component

* fix(billing): Fix NX error

This should compile just the library files and not its dependency files which was making it error

* [PM-24032] new premium upgrade button in navigation

* add missing outline none styles to focus state

* update story to use correct background colors. change ring color

* fixing broken stories by mocking services

* updates requested by design and product

* fixing tests

* new icon for premium

* fix: Update any type of private function

* update account dialog

* [PM-24032] updates to premium upgrade nav button

* add margin bottom to prevent button focus outline from being chopped off

* adding missing test

* feat(billing): add upgrade error message

* fix(billing): remove upgrade-flow service

* feat(billing): add account billing client

* fix(billing): Remove method from subscriber-billing client

* fix(billing): rename and update upgrade payment component

* fix(billing): Rename and update upgrade payment service

* fix(billing): Rename and upgrade upgrade account component

* fix(billing): Add unified upgrade dialog component

* fix(billing): Update component and service to use new tax service

* fix(billing): Update unified upgrade dialog

* feat(billing): Add feature flag

* feat(billing): Add vault dialog launch logic

* fix(billing): Add stricter validation for payment component

* fix(billing): Update custom dialog close button

* fix(billing): Fix padding in cart summary component

* fix(billing): Update payment method component spacing

* fix(billing): Update Upgrade Payment component spacing

* fix(billing): Update upgrade account component spacing

* fix(billing): Fix accurate typing

* hide continue button when coming from nav upgrade button

* fixing incorrect conflict resolution

* fixing tests

* pr feedback

* removing duplicate icon definition

---------

Co-authored-by: Stephon Brown <sbrown@livefront.com>
Co-authored-by: Bryan Cunningham <bryan.cunningham@me.com>
2025-10-14 10:39:37 -05:00
Dave
d082d336e7 Revert "feat(two-factor-api-service) [PM-26465]: (Refactor) Two-Factor API Se…" (#16856)
This reverts commit 886003ba88.
2025-10-13 14:22:49 -04:00
Dave
886003ba88 feat(two-factor-api-service) [PM-26465]: (Refactor) Two-Factor API Service (#16747)
* feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiServiceAbstraction.

* feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiService implementation.

* feat(two-factor-api-service) [PM-26465]: Add test suite for TwoFactorApiService.

* feat(two-factor-api-service) [PM-26465]: Replace ApiService dependencies with TwoFactorApiService for all refactored methods.

* feat(two-factor-api-service) [PM-26465]: Finish removal of Two-Factor API methods from ApiService.

* fix(two-factor-api-service) [PM-26465]: Correct endpoint spelling.

* feat(two-factor-api-service) [PM-26465]: Update dependency support for CLI.

* fix(two-factor-api-service) [PM-26465]: Update tests/deps for corrected spelling.

* feat(two-factor-api-service) [PM-26465]: Add TwoFactorApiService to Browser services module.

* fix(two-factor-api-service) [PM-26465]: Re-spell dependencies to take *Abstraction throughout, move to JslibServices module for cleaner importing across clients.

* feat(two-factor-api-service) [PM-26465]: Move new services to a feature area, rename abstract and concrete/default.

* feat(two-factor-api-service) [PM-26465]: Move the feature area to common/auth, not auth/common.

* feat(two-factor-api-service) [PM-26465]: Remove now-unneeded include from auth/tsconfig.
2025-10-13 12:48:25 -04:00
Kyle Denney
6ee41343a5 [PM-25379] Refactor org metadata (#16759)
* removing unused properties from org metadata

* removing further properties from the response and replacing them with data already available

* [PM-25379] new org metadata service for new endpoint

* don't need strict ignore

* forgot unit tests

* added cache busting to metadata service

not used yet - waiting for a decision on moving a portion of this to AC
2025-10-13 10:49:52 -05:00
Bernd Schoolmann
cc8bd71775 [PM-21033/PM-22863] User Encryption v2 (#14942)
* Add new encrypt service functions

* Undo changes

* Cleanup

* Fix build

* Fix comments

* Switch encrypt service to use SDK functions

* Move remaining functions to PureCrypto

* Tests

* Increase test coverage

* Split up userkey rotation v2 and add tests

* Fix eslint

* Fix type errors

* Fix tests

* Implement signing keys

* Fix sdk init

* Remove key rotation v2 flag

* Fix parsing when user does not have signing keys

* Clear up trusted key naming

* Split up getNewAccountKeys

* Add trim and lowercase

* Replace user.email with masterKeySalt

* Add wasTrustDenied to verifyTrust in key rotation service

* Move testable userkey rotation service code to testable class

* Fix build

* Add comments

* Undo changes

* Fix incorrect behavior on aborting key rotation and fix import

* Fix tests

* Make members of userkey rotation service protected

* Fix type error

* Cleanup and add injectable annotation

* Fix tests

* Update apps/web/src/app/key-management/key-rotation/user-key-rotation.service.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Remove v1 rotation request

* Add upgrade to user encryption v2

* Fix types

* Update sdk method calls

* Update request models for new server api for rotation

* Fix build

* Update userkey rotation for new server API

* Update crypto client call for new sdk changes

* Fix rotation with signing keys

* Cargo lock

* Fix userkey rotation service

* Fix types

* Undo changes to feature flag service

* Fix linting

* [PM-22863] Account security state (#15309)

* Add account security state

* Update key rotation

* Rename

* Fix build

* Cleanup

* Further cleanup

* Tests

* Increase test coverage

* Add test

* Increase test coverage

* Fix builds and update sdk

* Fix build

* Fix tests

* Reset changes to encrypt service

* Cleanup

* Add comment

* Cleanup

* Cleanup

* Rename model

* Cleanup

* Fix build

* Clean up

* Fix types

* Cleanup

* Cleanup

* Cleanup

* Add test

* Simplify request model

* Rename and add comments

* Fix tests

* Update responses to use less strict typing

* Fix response parsing for v1 users

* Update libs/common/src/key-management/keys/response/private-keys.response.ts

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Update libs/common/src/key-management/keys/response/private-keys.response.ts

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

* Fix build

* Fix build

* Fix build

* Undo change

* Fix attachments not encrypting for v2 users

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
2025-10-10 23:04:47 +02:00
John Harrington
89eb60135f [PM-24747] Remove chromium importer feature flag (#16749) 2025-10-10 13:29:12 -07:00
Nick Krantz
bc48164cb9 remove archive date when soft deleting (#16794) 2025-10-10 11:41:18 -05:00
Shane Melton
081cc4fc65 [PM-26749] Add missing properties to CipherView.fromJSON (#16818) 2025-10-09 14:02:12 -07:00
Miles Blackwood
2a2a36ea70 Removes clobbering emission of empty array. (#16682)
* Removes clobbering emission of empty array.

* Additional 'startWith' removal.
2025-10-09 15:47:58 -04:00
Nik Gilmore
4d2106a7c0 [PM-26096] Bugfix: Decryption errors for folders prevent vault access (#16796)
* Handle scenario where folders fail to decrypt

* Add comment explaining the folderViews$ filter check
2025-10-09 10:46:20 -07:00
Jordan Aasen
46aa3866df [PM-26681] - ensure initial cipher state is set for empty vaults (#16793)
* don't skip cipher state updates for empty vaults

* add specs and comment

* do not return ciphers, just return

* update spec names
2025-10-08 14:13:59 -07:00
Oscar Hinton
095729d6fa [PM-23189] Add client managed token provider (#15408)
* Add client managed token provider

* Change token service to accept user id

* Resolve breaking changes in the SDK

* Fix tests

* Update sdk

* Fix type

* Fix types

* Fix cli

* Fix browser

* Add optional userId to refreshIdentityToken

* Fix merge issues

* Fix tests
2025-10-08 16:47:30 -04:00
Stephon Brown
da8a0104ea Billing/pm 24996/implement upgrade from free dialog (#16470)
* feat(billing): add required messages

* feat(billing): Add upgrade from free account dialog

* feat(billing): Add payment dialog for premium upgrade

* feat(billing): Add Upgrade Payment Service

* feat(billing): Add Upgrade flow service

* feat(billing): Add purchase premium subscription method to client

* fix(billing): allow for nullable taxId for families organizations

* fix(billing): Fix Cart Summary Tests

* temp-fix(billing): add currency pipe to pricing card component

* fix(billing): Fix NX error

This should compile just the library files and not its dependency files which was making it error

* fix: Update any type of private function

* update account dialog

* feat(billing): add upgrade error message

* fix(billing): remove upgrade-flow service

* feat(billing): add account billing client

* fix(billing): Remove method from subscriber-billing client

* fix(billing): rename and update upgrade payment component

* fix(billing): Rename and update upgrade payment service

* fix(billing): Rename and upgrade upgrade account component

* fix(billing): Add unified upgrade dialog component

* fix(billing): Update component and service to use new tax service

* fix(billing): Update unified upgrade dialog

* feat(billing): Add feature flag

* feat(billing): Add vault dialog launch logic

* fix(billing): Add stricter validation for payment component

* fix(billing): Update custom dialog close button

* fix(billing): Fix padding in cart summary component

* fix(billing): Update payment method component spacing

* fix(billing): Update Upgrade Payment component spacing

* fix(billing): Update upgrade account component spacing

* fix(billing): Fix accurate typing

* feat(billing): adds unified upgrade prompt service

* fix(billing): Update unified dialog to account for skipped steps

* fix(billing): Use upgradePromptService for vault

* fix(billing): Format

* fix(billing): Fix premium check
2025-10-08 10:20:15 -04:00
Derek Nance
0e56392b34 [PM-13422] Fix flaky test around sync time (#16773) 2025-10-07 15:13:33 -05:00
Jordan Aasen
3a909db234 [PM-23368] - [Defect] Browser - Autofill options disappear after vault sync and page refresh (#16590)
* skip cache updating when sync data hasn't changed

* re-insert comment

* check for diff in replace method

* update comment
2025-10-07 11:40:27 -07:00
Shane Melton
9f0a565241 [PM-25682] Migrate CipherView and subviews to be TS strict compliant (#16463)
* [PM-25682] Remove ts-strict-ignore from Vault view models and update types to be strict

* [PM-25682] Ignore ViewEncryptableKeys error for old decrypt methods

* [PM-25682] Add null/undefined as possible types for isNull* and other helpers that include null checks internally

* [PM-25682] Use patchValue instead of setValue which does not support undefined values

* [PM-25682] Add type assertions and other misc. null checks where necessary

* [PM-25682] Fix importers specs

* [PM-25682] Cleanup card view/details

* [PM-25682] Fix cipher view hasAttachment helper

* [PM-25682] Cleanup unecessary null assignments in notification.background.spec.ts

* [PM-25682] Ensure linkedId is undefined instead of null

* [PM-25682] Cleanup misc typing errors

* [PM-25682] Make the CipherId required

* [PM-25682] Undo CipherId assertions

* [PM-25682] Undo brand initial value change

* [PM-25682] Update SshKeyView

* [PM-25682] Add constructor to Fido2CredentialView

* [PM-25682] Prettier

* [PM-25682] Fix strict type warnings after merge with main

* [PM-25682] Cleanup cipher view spec

* [PM-25682] Cleanup new type warnings after merge

* [PM-25682] Undo removed eslint-disable-next-line comment

* [PM-25682] Fix flaky test

* [PM-25682] Use satisfies instead of as for Fido2CredentialAutofillView
2025-10-07 11:40:57 -04:00
Oscar Hinton
8cf379d997 [PM-22305] Upgrade typescript to 5.8 (#15044)
Upgrade to the latest supported typescript version in Angular.

Resolved TS errors by:
  - adding `: any` which is what the compiler previously implied and now warns about.
  - adding `toJSON` to satisfy requirement.
2025-10-06 12:39:40 -04:00
Jordan Aasen
a690e9a626 [PM-26406] - [Defect] Cannot import account restricted json (#16709)
* cast boolean values in toSdkCipherView

* update to toSdkCipherView

* fix toSdkCipherView

* fix toSdkCipherView
2025-10-03 09:07:20 -07:00
Oscar Hinton
a1e226b598 [PM-25603] Use angular template for avatar (#15978)
We should be able to simplify the angular component by using svg element directly.
2025-10-03 11:51:25 +02:00
cd-bitwarden
cb20889a94 [SM-1489] machine account event logs (#15997)
* Adding enums for additional event logs for secrets

* updating messages

* Updating messages to be consistent for logs

* Displaying project logs, and fixing search query param searching in projects list, having deleted log for secrets and projects not show as a link

* Viewing secret and project event logs in event modal, adding to the context menu for secrets and projects the ability to view the logs if user has permission. Restricting logs to SM projs and Secs if the logged in user has event log access but not SM access.

* lint

* Lint Fixes

* fix to messages file

* fixing lint

* Adding machine account event logs

* lint fix

* Update event.service.ts

* removing duplicate function issue from merge

* Update service-accounts-list.component.ts

* fixing message

* Fixes to QA bugs

* lint fix

* linter for messages is annoying

* lint
2025-10-03 09:52:00 +02:00
Jared Snider
4313dd2ecb feat(SendAccess): [Auth/PM-22661] SendTokenService + SDK Integration (#16007)
* PM-22661 - Start bringing in code from original PR

* PM-22661 - SendTokenService - implement and test hash send password

* PM-22661 - Starting to pull in SDK state to SendTokenService

* PM-22661 - WIP on default send token service

* PM-22661 - Build out TS helpers for TryGetSendAccessTokenError

* PM-22661 - WIP

* PM-22661 - Decent progress on getting _tryGetSendAccessToken wired up

* PM-22661 - Finish service implementation (TODO: test)

* PM-22661 - DefaultSendTokenService - clear expired tokens

* PM-22661 - SendTokenService - tests for tryGetSendAccessToken$

* PM-22661 - DefaultSendTokenService - more tests.

* PM-22661 - Refactor to create domain facing type for send access creds so we can internally map to SDK models instead of exposing them.

* PM-22661 - DefaultSendTokenService tests - finish testing error scenarios

* PM-22661 - SendAccessToken - add threshold to expired check to prevent tokens from expiring in flight

* PM-22661 - clean up docs and add invalidateSendAccessToken

* PM-22661 - Add SendAccessToken tests

* PM-22661 - Build out barrel files and provide send token service in jslib-services.

* PM-22661 - Improve credential validation and test the scenarios

* PM-22661 - Add handling for otp_generation_failed

* PM-22661 - npm i sdk version 0.2.0-main.298 which has send access client stuff

* PM-22661 - Bump to latest sdk changes for send access for testing.

* PM-22661 - fix comment to be accurate

* PM-22661 - DefaultSendTokenService - hashSendPassword - to fix compile time error with passing a Uint8Array to Utils.fromBufferToB64, add new overloads to Utils.fromBufferToB64 to handle ArrayBuffer and ArrayBufferView (to allow for Uint8Arrays). Then, test new scenarios to ensure feature parity with old fromBufferToB64 method.

* PM-22661 - Utils.fromBufferToB64 - remove overloads so ordering doesn't break test spies.

* PM-22661 - utils.fromBufferToB64 - re-add overloads to see effects on tests

* PM-22661 - revert utils changes as they will be done in a separate PR.

* PM-22661 - SendTokenService tests - test invalidateSendAccessToken

* PM-22661 - DefaultSendTokenService - add some storage layer tests

* PM-22661 - Per PR feedback fix comment

* PM-22661 - Per PR feedback, optimize writes to state for send access tokens with shouldUpdate.

* PM-22661 - Per PR feedback, update clear to be immutable vs delete (mutation) based.

* PM-22661 - Per PR feedback, re-add should update for clear method.

* PM-22661 - Update libs/common/src/auth/send-access/services/default-send-token.service.ts

Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>

* PM-22661 - Update libs/common/src/auth/send-access/services/default-send-token.service.ts

Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>

* PM-22661 - Update libs/common/src/auth/send-access/services/default-send-token.service.ts

Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>

---------

Co-authored-by: rr-bw <102181210+rr-bw@users.noreply.github.com>
2025-10-02 08:55:04 -04:00
Alex Morask
d9d8050998 [PM-25463] Work towards complete usage of Payments domain (#16532)
* Use payment domain

* Fixing lint and test issue

* Fix organization plans tax issue

* PM-26297: Use existing billing address for tax calculation if it exists

* PM-26344: Check existing payment method on submit
2025-10-01 10:26:47 -05:00
Derek Nance
babbc2b1b6 [PM-13422] Fix sync time (#16603)
Do not update the "last sync time" when an error occurs during the sync process, including a network error when retrieving the account's revision date/time from the server. Update the sync time when a sync fires automatically, or when forced, in order to make it clear to the user that the extension's data is current.
2025-09-30 15:54:04 -05:00
Brandon Treston
f793c2da09 remove feature flag (#16640) 2025-09-30 11:33:39 -04:00
Nick Krantz
727689d827 [PM-24534] Archive via CLI (#16502)
* refactor `canInteract` into a component level usage.

- The default service is going to be used in the CLI which won't make use of the UI-related aspects

* all nested entities to be imported from the vault

* initial add of archive command to the cli

* add archive to oss serve

* check for deleted cipher when attempting to archive

* add searchability/list functionality for archived ciphers

* restore an archived cipher

* unarchive a cipher when a user is editing it and has lost their premium status

* add missing feature flags

* re-export only needed services from the vault

* add needed await

* add prompt when applicable for editing an archived cipher

* move cipher archive service into `common/vault`

* fix testing code
2025-09-30 10:45:04 -04:00
Jared Snider
2ccd841f58 feat(Utils.fromBufferToB64): [Platform/PM-26186] Add type safety and ArrayBufferView support + tests (#16609)
* PM-26186 - Utils.ts - fromBufferToB64 - (1) Add type safety (2) Add ArrayBufferView support (3) Add tests

* PM-26186 - Utils.ts - add overloads so that we can specify callers who pass defined buffers will always get a string back so I don't have to modify all call sites to add a null assertion or  "as string"
2025-09-30 07:53:10 -04:00
rr-bw
5f7e1f99bf chore(flag-removal): [Auth/PM20439] Remove flagging logic and flag (BrowserExtensionLoginApproval) (#16568) 2025-09-29 13:29:56 -07:00
Daniel Riera
b56c9e6c9a [PM-26078] Create admin UI for Autotype Desktop Default Setting Policy (#16573)
* PM-26078 add component and copy

* add enum

* register oss policy

* export policy definition

* update naming to match policy
2025-09-25 16:57:31 -04:00
Shane Melton
6c786ba247 [PM-25172] Do not null coalesce a login's autofillOnPageLoad setting to false. Undefined is a valid option that defaults to the extension autofill on page load setting (#16596) 2025-09-25 08:47:33 -07:00
Addison Beck
daae86ef57 build: add nx configuration in libs/common (#16544) 2025-09-24 13:20:42 +02:00
Bernd Schoolmann
4b73198ce5 [PM-23230] Implement KDF Change Service (#15748)
* Add new mp service api

* Fix tests

* Add test coverage

* Add newline

* Fix type

* Rename to "unwrapUserKeyFromMasterPasswordUnlockData"

* Fix build

* Fix build on cli

* Fix linting

* Re-sort spec

* Add tests

* Fix test and build issues

* Fix build

* Clean up

* Remove introduced function

* Clean up comments

* Fix abstract class types

* Fix comments

* Cleanup

* Cleanup

* Update libs/common/src/key-management/master-password/types/master-password.types.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/master-password/services/master-password.service.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/master-password/types/master-password.types.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Add comments

* Fix build

* Add arg null check

* Cleanup

* Fix build

* Fix build on browser

* Implement KDF change service

* Deprecate encryptUserKeyWithMasterKey

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update libs/common/src/key-management/master-password/abstractions/master-password.service.abstraction.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Add tests for null params

* Fix builds

* Cleanup and deprecate more functions

* Fix formatting

* Prettier

* Clean up

* Update libs/key-management/src/abstractions/key.service.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Make emailToSalt private and expose abstract saltForUser

* Add tests

* Add docs

* Fix build

* Fix tests

* Fix tests

* Address feedback and fix primitive obsession

* Consolidate active account checks in change kdf confirmation component

* Update libs/common/src/key-management/kdf/services/change-kdf-service.spec.ts

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Add defensive parameter checks

* Add tests

* Add comment for follow-up epic

* Move change kdf service, remove abstraction and add api service

* Fix test

* Drop redundant null check

* Address feedback

* Add throw on empty password

* Fix tests

* Mark change kdf service as internal

* Add abstract classes

* Switch to abstraction

* use sdk EncString in MasterPasswordUnlockData

* fix remaining tests

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
2025-09-23 16:10:54 -04:00
rr-bw
3bbc6c564c feat(SSO): (Auth/[PM-22110] Remove Alternate Login Options when SSO Required (#16340)
If a user is part of an org that has the `RequireSso` policy, when that user successfully logs in we add their email to a local `ssoRequiredCache` on their device. The next time this user goes to the `/login` screen on this device, we will use that cache to determine that for this email we should only show the "Use single sign-on" button and disable the alternate login buttons.

These changes are behind the flag: `PM22110_DisableAlternateLoginMethods`
2025-09-22 08:32:20 -07:00
Rui Tomé
b455cb5986 [PM-24146] Remove stateProvider.activeUserId from ProviderService (#16258)
* Refactor provider service calls to include userId parameter

- Updated multiple components and services to pass userId when fetching provider data.
- Adjusted the ProviderService interface to require userId for get, get$, and getAll methods.
- Ensured consistent handling of userId across various components, enhancing data retrieval based on active user context.

* Remove deprecated type safety comments and use the getById utility for fetching providers.

* Update ProviderService methods to return undefined for non-existent providers

- Modified the return types of get$ and get methods in ProviderService to allow for undefined values, enhancing type safety.
- Adjusted the providers$ method to return only defined Provider arrays, ensuring consistent handling of provider data.

* Enhance provider permissions guard tests to include userId parameter

- Updated test cases in provider-permissions.guard.spec.ts to pass userId when calling ProviderService methods.
- Mocked AccountService to provide active account details for improved test coverage.
- Ensured consistent handling of userId across all relevant test scenarios.

* remove promise based api's from provider service, continue refactor

* cleanup observable logic

* cleanup

---------

Co-authored-by: Brandon <btreston@bitwarden.com>
2025-09-22 11:06:28 -04:00
Jason Ng
dbec02cf8d [PM-24533] Initialize Archive Feature (#16226)
* [PM-19237] Add Archive Filter Type (#13852)
* Browser can archive and unarchive items
* Create Archive Cipher Service
* Add flag and premium permissions to Archive 

---------

Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
Co-authored-by: Shane <smelton@bitwarden.com>
Co-authored-by: Patrick Pimentel <ppimentel@bitwarden.com>
2025-09-22 11:06:02 -04:00
Alex
8531109081 [PM-25417] DIRT API Service Refactor (ADR-0005) (#16353)
* encode username for uri and add spec

* verify response from getHibpBreach method

* test/validate for BreachAccountResponse type and length instead of mock response

* - extract dirt api method out of global api service
- create new directory structure
- change imports accordingly
- extract breach account response
- put extracted code into new dirt dir

* codeowners and dep injection for new hibp service
2025-09-22 09:06:58 -05:00
Nik Gilmore
8af3e025e3 [PM-24745] Decrypt ciphers using decryptManyWithFailures from SDK (#16190)
* Add SDK call to decryptManyWithFailures instead of decryptMany

* Move logic back to decryptCiphersWithSdk

* Fix return type of decryptCiphersWithSdk

* Add unit tests for decryptCiphers()

* Add unit tests for decryptManyWithFailures

* Filter out undefined objects from failedCiphers

* Update name for failed-decryption ciphers

* Fix type checking errors in tests

* Fix tests with new changes from main

* Migrate decryptMany call to use decryptManyWithFailures

* Remove deprecated decryptMany function, along with all calls ot the function
2025-09-19 13:51:20 -07:00
Alex Morask
d8339f0196 [PM-23513] Complete usage of OrganizationWarningsService (#16272)
* Use OrganizationWarningsService in AC VaultComponent

* Use OrganizationWarningsService in OrgSwitcherComponent

* Use OrganizationWarningsService in VaultFilterComponent

* Use OrganizationWarningsService in VaultComponent

* Use OrganizationWarningsService in SM OverviewComponent

* Remove TrialFlowService from unused codepaths

* Remove TrialFlowService

* Refresh free trial warning on standard payment method update

* Fix lint errors

* Fix lint errors

* Remove FF

* Fix free trial banner on deprecated ac vault component
2025-09-19 11:26:48 -05:00
Leslie Tilton
7090547cb8 [PM-19814] Phishing Detection Warning Popup UI (#16064)
* Add PhishingDetectionService

* Add a tab listener.

* Get the known phishing domain from the server

* Get the known phishing domain from the server

* Add phishing detection content script.

* Revert "Add phishing detection content script."

This reverts commit ce64d3435a.

* Fix conflicts

* Add build configs.

* Decouple the phishing detection content script logic from the rest of the app.

* move the call to background

* Add communication between the content script and background service.

* Update code to use Log service.

* Resolve conflict

* Add changes for phishing domain report

* Fix initializer order issue.

* Fix domain error.

* Account for no responses.

* Add exit functionality for onclick.

* Wrapped phishing detection feature behind feature flag (#13915)

* push changes for alert

* Removed browser logic for checking feature flag

* move the alert as dialog

* Add functionality to navigate back in history.

* [PM-19814] Add redirect to warning page when a phishing domain is detected.

* [PM-19814] Add the phishing warning page to the Angular popup.

* [PM-19814] Add functionality to display phishing host.

* [PM-19814] Add exit button and learn more link.

* [PM-19814] Add phishing detection feature flag.

* [PM-19814] Move phishing service to phishing directory

* [PM-19814] Add UI to display phishing URL.

* [PM-19814] Disable the URL input and populate it with the phishing URL.

* [PM-19814] Add phishing icon

* [PM-19814] Temporarily remove phishing reporting feature. It can be released separately in another ticket.

* [PM-19814] Clean up

* [PM-19814] Add types to the handlers.

* [PM-19814] Remove logic for handling authentication since the endpoint will be unauthenticated.

* [PM-19814] Fixed as many type issues as possible; added @ts-strict-ignore to the remaining ones.

* [PM-19814] Fix race condition in feature flag check.

* [PM-19814] Update wording for the marketing request.

* [PM-19814] Move phishing detection check from content script to webRequest.onCompleted listener.

* [PM-19814] Use webNavigation.onCompleted for redirect to ensure that the redirect only happens when they land on the page.

* [PM-19814] Remove unused code.

* [PM-19814] Fix merge conflict and update text based on product owner’s request

* [PM-19814] Fix merge conflict

* [PM-19814] Update text

* Resolve the message catalog entries

* Update file for consistent import and exports

* Update imports

* Update another import for BrowserPopupUtils

* Update the rest of the imports for BrowserPopupUtils

* Updates messages

* Rename files

* Current phishing block changes

* Use globalthis for chrome

* Add types file

* Update browser api to include tab navigation and close tab functions

* Update phishing detection to track multiple tabs and not trust info from content script

* Change chrome to browser.

* Fixed phishing detection checking previous url instead of current on navigation. Updated def flag for testing urls.

* Move phishing icon

* Fix chrome specific issues. Add comments to where BrowserApi should be used

* Fix command errors. Typecheck messages. Added guard for phishing detection messages

* Use concat map instead of merge map

* Unformat webfonts.scss file

* Fix lint and import errors

* Move phishing blocker files to dirt folder

* Rename background folder to services

* Add code ownership for phishing blocker

* Update text to use locales on phishing blocker learn more page

* Change navigation from using webapi to browser on updated event for safari support

* Update icon usage

* Fix type issues and add test file

* Fix linting error in test

---------

Co-authored-by: Jimmy Vo <huynhmaivo82@gmail.com>
Co-authored-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
Co-authored-by: Tom <144813356+ttalty@users.noreply.github.com>
2025-09-19 10:56:27 -05:00
Daniel James Smith
b091719748 Introduce a stricter use of the OrganizationId type on org-vault exports (#15836)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-09-18 20:02:49 +00:00
Jimmy Vo
68d7cb4846 [PM-25922] Hotfix: Revert canManageDeviceApprovals (#16478) 2025-09-18 15:49:42 -04:00
Jared Snider
42ec956782 feat(PlatformUtils): [Auth/PM-25817] New PlatformUtilsService.isChromium() method (#16468) 2025-09-18 14:36:35 -04:00
Jordan Aasen
4b78da1623 [PM-21794] - remove RemoveCardItemTypePolicy flag (#16450)
* remove restricted item types flag

* fix RestrictedItemTypesService constructor
2025-09-18 09:53:01 -07:00
Anders Åberg
3a2bee9444 Remove fido2 google.com workaround (#16347)
Updates the transports property in the credential creation response
to only include "internal" and "hybrid" transports.
2025-09-18 10:32:25 +02:00
Daniel James Smith
ba817f0389 [PM-25503] Use org export api on encrypted and unencrypted org exports (#16290)
* Introduce a new vault-export-api.service to replace the existing getOrganizationExport method in apiService

* Use new vault-export-api.service instead of the ApiService to retrieve organizational export data

* Remove unused method from apiService

* Register VaultExportApiService on browser

* Fxi linting issue by executing `npm run prettier`

* Rename abstraction and implementation of VaultExportApiService

* Use undefined instead of null

* Rename file of default impl of vault-export-api-service

* Fix test broken with 1bcdd80eea

* Define type for exportPromises

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-09-17 22:22:12 +02:00
Jordan Aasen
caf4ca6980 [PM-25633] - fix premium upgrade prompt (#16445)
* fix premium upgrade prompt

* use map instead of adding tap dep

* update route
2025-09-17 09:30:39 -07:00
Vijay Oommen
0a7fb49f3c PM-25870 feature flag for Activity tab on Risk Insights (#16447) 2025-09-16 13:55:32 -05:00
Vijay Oommen
942d9d666c PM-23366 Define Categories and map the events to the categories (#16444) 2025-09-16 13:35:21 -05:00
Daniel Riera
7ce8d06315 PM-25075 [Remove - Step 1] Flagged logic from clients/server and clients notification-refresh feature flag (#16113)
* PM-25075 wip parking work

* remove flag from enums and add fade out

* fix tests

* remove flags from enum file after merge conflict re introduced

* remove dead code paths

* change naming back to bgUnlockPopoutOpened
2025-09-15 14:55:36 -04:00
Addison Beck
7ac75a6c52 refactor(libs): consolidate messaging-internal into messaging library (#16386)
This change eliminates the circular dependency between messaging and messaging-internal libraries by merging them into a single messaging library.

Previously, messaging-internal imported from @bitwarden/messaging while messaging tried to import from @bitwarden/messaging-internal, creating an unresolvable circular dependency. This also violated Nx best practices by using cross-library file includes in tsconfig.lib.json.

Changes made:
- Moved all messaging-internal code (SubjectMessageSender, helpers, tests) into libs/messaging/src/
- Updated all imports to use relative paths instead of @bitwarden/messaging imports
- Removed the entire messaging-internal library and its configuration files
- Updated external references in apps/browser to import from @bitwarden/messaging
- Fixed libs/messaging/tsconfig.lib.json to use standard src/**/*.ts pattern
- Updated libs/common internal.ts to re-export from messaging instead of messaging-internal

The messaging library now exports both public APIs and internal implementations, which is a cleaner architecture than maintaining two separate libraries with circular dependencies.

Fixes rootDir configuration issues identified in the Nx library systematic fix project.
2025-09-12 13:04:13 +02:00