* Moved has-premium.guard under billing
* Moved free-trial.ts to billing
* Moved premium directives to billing
* Moved families-policy.service.ts to billing
* Moved trial initiation from auth to billing
* 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
* Remove deprecated and unused PasswordGenerationService
* Remove unused state-service
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* 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.
* refactor PolicyService.getAll$ to make userId not optional
* add fix to browser
* fix test to read from mock singleUserState
* remove nested pipes, cleanup
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
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.
* [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
* [PM-5718] Fix totp generation for free orgs in old add-edit component
* [PM-5718] Fix totp generation for free orgs in view cipher view component
* [PM-5718] Cleanup merge conflicts
* Don't generate totp code for premium users or free orgs
* Added redirect to organization helper page
* Changed text to learn more
* Only show upgrade message to premium users
* Show upgrade message to free users with free orgs as well
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: gbubemismith <gsmithwalter@gmail.com>
Update all libs to use explicit dependencies rather than relying on tsconfig.libs.json. This allows us to more easily understand the dependencies between libs and prevent users from accidentally adding new dependencies.
We still use tsconfig.libs (now renamed tsconfig.spec) for tests.
* [PM-16098] Add decryptionFailure flag to CipherView
* [PM-16098] Add failedToDecryptCiphers$ observable to CipherService
* [PM-16098] Introduce decryption-failure-dialog.component
* [PM-16098] Disable cipher rows for the Web Vault
* [PM-16098] Show decryption error dialog on vault load or when attempting to view/edit a corrupted cipher
* [PM-16098] Browser - Show decryption error dialog on vault load or when attempting to view/edit a corrupted cipher
* [PM-16098] Desktop - Show decryption error dialog on vault load or when attempting to view a corrupted cipher. Remove edit/clone context menu options and footer actions.
* [PM-16098] Add CS link to decryption failure dialog
* [PM-16098] Return cipherViews and move filtering of isDeleted to consumers
* [PM-16098] Throw an error when retrieving cipher data for key rotation when a decryption failure is present
* [PM-16098] Properly filter out deleted, corrupted ciphers when showing dialog within the Vault
* [PM-16098] Show the decryption error dialog when attempting to view a cipher in trash and disable the restore option
* [PM-16098] Exclude failed to decrypt ciphers from getAllDecrypted method and cipherViews$ observable
* [PM-16098] Avoid re-sorting remainingCiphers$ as it was redundant
* [PM-16098] Update tests
* [PM-16098] Prevent opening view dialog in AC for corrupted ciphers
* [PM-16098] Remove withLatestFrom operator that was causing race conditions when navigating away from the individual vault
* [PM-16098] Ensure decryption error dialog is only shown once on Desktop when switching accounts
Adds a device management tab under settings -> security that allows users to:
- View and manage their account's connected devices
- Remove/deactivate devices
- See device details like platform, last login, and trust status
- Sort and filter device list with virtual scrolling
Resolves PM-1214
* add disabledInteractionsUris state to the domain settings service
* add routes and ui for user disabledInteractionsUris state management
* use disabled URIs service state as a preemptive conditon to injecting content scripts
* move disabled domains navigation button from account security settings to autofill settings
* update disabled domain terminology to blocked domain terminology
* update copy
* handle blocked domains initializing with null value
* add dismissable banner to the vault view when the active autofill tab is on the blocked domains list
* add autofill blocked domain indicators to autofill suggestions section header
* add BlockBrowserInjectionsByDomain feature flag and put feature behind it
* update router config to new style
* update tests and cleanup
* use full-width-notice slot for domain script injection blocked banner
* convert thrown error on content script injection block to a warning and early return
* simplify and enspeeden state resolution for blockedInteractionsUris
* refactor feature flag state fetching and update tests
* document domain settings service
* remove vault component presentational updates
* Migrated folder service from using active user state to single user state
Added extra test cases for encrypted folder and decrypted folders
Updated derived state to use decrypt with key
* Update callers in the web
* Update callers in the browser
* Update callers in libs
* Update callers in cli
* Fixed test
* Fixed folder state test
* Fixed test
* removed duplicate activeUserId
* Added takewhile operator to only make calls when userId is present
* Simplified to accept a single user id instead of an observable
* Required userid to be passed from notification service
* [PM-15635] Folders not working on desktop (#12333)
* Added folders memory state definition
* added decrypted folders state
* Refactored service to remove derived state
* removed combinedstate and added clear decrypted folders to methods
* Fixed test
* Fixed issue with editing folder on the desktop app
* Fixed test
* Changed state name
* fixed ts strict issue
* fixed ts strict issue
* fixed ts strict issue
* removed unnecessasry null encrypteed folder check
* Handle null folderdata
* [PM-16197] "Items with No Folder" shows as a folder to edit name and delete (#12470)
* Force redcryption anytime encryption state changes
* Fixed text file
* revert changes
* create new object with nofolder instead of modifying exisiting object
* Fixed failing test
* switched to use memory-large-object
* Fixed ts sctrict issue
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
This PR deletes the legacy lock components from the Angular clients and also removes feature flag control from the routing. The lock component will now be based entirely on the new, recently refreshed LockComponent in libs/auth/angular.
* add account created date to the account information
* set permanent dismissal flag when the user selects that they can access their email
* update the logic of device verification notice
* add service to cache the profile creation date to avoid calling the API multiple times
* update step one logic for new device verification + add tests
* update step two logic for new device verification + add tests
- remove remind me later link for permanent logic
* migrate 2FA check to use the profile property rather than hitting the API directly.
The API for 2FA providers is only available on web so it didn't work for browser & native.
* remove unneeded account related changes
- profile creation is used from other sources
* remove obsolete test
* store the profile id within the vault service
* remove unused map
* store the associated profile id so account for profile switching in the extension
* add comment for temporary service and ticket number to remove
* formatting
* move up logic for feature flags
* starting
* setup first page for new device verification notice
* update designs for first page. rename components and files
* added second page for new device verification notice
* update notice page one with bit radio buttons. routing logic. user email
* updated routing for new device verification notice to show before vault based on flags, and can navigate back to vault after submission
* fix translations. added remind me later link and nav to page 2
* sync the design for mobile and web
* update routes in desktop
* updated styles for desktop
* moved new device verification notice guard
* update types for new device notice page one
* add null check to page one
* types
* types for page one, page two, service, and guard
* types
* update component and guard for null check
* add navigation to two step login btn and account email btn
* remove empty file
* update fill of icons to support light & dark modes
* add question mark to email access verification copy
* remove unused map
* use links for navigation elements
- an empty href is needed so the links are keyboard accessible
* remove clip path from exclamation svg
- No noticeable difference in the end result
* inline email message into markup
---------
Co-authored-by: Nick Krantz <nick@livefront.com>
* add user asymmetric key api service
* Add user asymmetric key regen service
* add feature flag
* Add LoginSuccessHandlerService
* add loginSuccessHandlerService to BaseLoginViaWebAuthnComponent
* Only run loginSuccessHandlerService if webAuthn is used for vault decryption.
* Updates for TS strict
* bump SDK version
* swap to combineLatest
* Update abstractions
This PR fixes a bug in the LockComponent refresh that affected the setup/save and use passkey flows. The user was wrongly directly to the /vault after unlock instead of to /fido2 (the passkey screen).
Feature Flag: ExtensionRefresh ON
Consolidates existing SSO components into a single unified component in
libs/auth, matching the new design system. This implementation:
- Creates a new shared SsoComponent with extracted business logic
- Adds feature flag support for unauth-ui-refresh
- Updates page styling including new icons and typography
- Preserves web client claimed domain logic
- Maintains backwards compatibility with legacy views
PM-8114
---------
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
* enabling drag and drop for cipher fields
* adding drag and drop to totp and fido
* removing code changes to wrong file
* undoing uneeded change
* Changes suggested by Shane
* fixes
* fixes
* moving export to the correct spot
---------
Co-authored-by: --global <>
* Add proxy support for file uploads
Instead of using node's native fetch we extend ApiService with NodeApiService to add support for proxies using `node-fetch`
* Fix constructors for FileUploadService in browser
* Fix dependency on ApiService within jslib-services.module
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Use typescript-strict-plugin to iteratively turn on strict
* Add strict testing to pipeline
Can be executed locally through either `npm run test:types` for full type checking including spec files, or `npx tsc-strict` for only tsconfig.json included files.
* turn on strict for scripts directory
* Use plugin for all tsconfigs in monorepo
vscode is capable of executing tsc with plugins, but uses the most relevant tsconfig to do so. If the plugin is not a part of that config, it is skipped and developers get no feedback of strict compile time issues. These updates remedy that at the cost of slightly more complex removal of the plugin when the time comes.
* remove plugin from configs that extend one that already has it
* Update workspace settings to honor strict plugin
* Apply strict-plugin to native message test runner
* Update vscode workspace to use root tsc version
* `./node_modules/.bin/update-strict-comments` 🤖
This is a one-time operation. All future files should adhere to strict type checking.
* Add fixme to `ts-strict-ignore` comments
* `update-strict-comments` 🤖
repeated for new merge files