* Require lifetime specification of user-scoped data
* Decouple tests for different classes
This coupling assumed constant interfaces with classes that isn't a guarantee and requires significant acrobatics to make types work, now that key definitions are not a consistent base.
* Fix types
* Clone Initial Data In `runMigrator`
- When using test cases, mutating the input data causes problems.
* Migrate `minimizeOnCopy` & `browserIntegrationEnabled`
* Update From Main
* Move Fingerprint Setting
- No Migration Yet
* Add Fingerprint to Migrations
* Convert Messaging to `async`
* Switch to calling `Boolean` for Map Function
* Catch Errors
* Remove LogService
* Do not update appId if it is not null
* Prefer linear transformations to side-effect-based changes
This leaves us open to repeat emits due to updates, but distinct until changed stops those.
Tracker improvements are due to passed in observables with replay causing immediate emits when `expectingEmission`s. This converts to a cold observable that only emits when the tracked observable does _after_ subscribing.
* Prefer while
* PR review
* [PM-7683] Add fullAddressForCopy helper to identity.view
* [PM-7683] Introduce CopyCipherFieldService to the Vault library
- A new CopyCipherFieldService that can be used to copy a cipher's field to the user clipboard
- A new appCopyField directive to make it easy to copy a cipher's fields in templates
- Tests for the CopyCipherFieldService
* [PM-7683] Introduce item-copy-actions.component
* [PM-7683] Fix username value in copy cipher directive
* [PM-7683] Add title to View item link
* [PM-8456] Introduce initial item-more-options.component
* [PM-8456] Add logic to show/hide login menu options
* [PM-8456] Implement favorite/unfavorite menu option
* [PM-8456] Implement clone menu option
* [PM-8456] Hide launch website instead of disabling it
* [PM-8456] Ensure cipherList observable updates on cipher changes
* [PM-7683] Move disabled logic into own method
* [PM-8456] Cleanup spec file to use Angular testbed
* [PM-8456] Fix more options tooltip
* [PM-8485] Introduce new PopupCipherView
* [PM-8485] Use new PopupCipherView in items service
* [PM-8485] Add org icon for items that belong to an organization
* [PM-8485] Fix tests
* [PM-8485] Remove share operator from cipherViews$
* [PM-7683] Add fullAddressForCopy helper to identity.view
* [PM-7683] Introduce CopyCipherFieldService to the Vault library
- A new CopyCipherFieldService that can be used to copy a cipher's field to the user clipboard
- A new appCopyField directive to make it easy to copy a cipher's fields in templates
- Tests for the CopyCipherFieldService
* [PM-7683] Introduce item-copy-actions.component
* [PM-7683] Fix username value in copy cipher directive
* [PM-7683] Add title to View item link
* [PM-8456] Introduce initial item-more-options.component
* [PM-8456] Add logic to show/hide login menu options
* [PM-8456] Implement favorite/unfavorite menu option
* [PM-8456] Implement clone menu option
* [PM-8456] Hide launch website instead of disabling it
* [PM-8456] Ensure cipherList observable updates on cipher changes
* [PM-7683] Move disabled logic into own method
* [PM-8456] Cleanup spec file to use Angular testbed
* [PM-8456] Fix more options tooltip
* [PM-7683] Add fullAddressForCopy helper to identity.view
* [PM-7683] Introduce CopyCipherFieldService to the Vault library
- A new CopyCipherFieldService that can be used to copy a cipher's field to the user clipboard
- A new appCopyField directive to make it easy to copy a cipher's fields in templates
- Tests for the CopyCipherFieldService
* [PM-7683] Introduce item-copy-actions.component
* [PM-7683] Fix username value in copy cipher directive
* [PM-7683] Add title to View item link
* [PM-7683] Move disabled logic into own method
Utilizing resources based on thread availability improves performance vs fixed threading.
The linked issue for CI crashes has not been closed. Once this is solves, `runInBand` may improves performance in CI.
* PM-8367 - WIP - initial comp creation
* PM-8367 - Majority of new registration self hosted env config dialog working
* PM-8367 - RegistrationEnvSelectorComponent - add method handleSelfHostedEnvConfigDialogResult and add toast for happy path.
* PM-8367 - Add validation TODO
* PM-8367 - RegistrationSelfHostedEnvConfigDialogComponent - Add validator
* PM-8367 - RegEnvSelector - Only show self hosted if the client is browser or desktop since we will be using the selector on web as well.
* PM-8367 - Registration start comp - add env selector
* PM-8367 - Registration start - add proper import for standalone comps.
* PM-8367 - Registration Start - get storybook fixed with registration env selector
* PM-8367 - Add self hosted server to web translations only for storybook
* PM-8367 - Add more storybook examples and update docs (WIP - need to test self hosted selection)
* PM-8367 - Registration Start - update stories
* PM-8367 - Env Selector now emits selected region so that parent comps can listen to it if needed.
* PM-8367 - Registration Start - wire up handler for selectedRegionChange so that the parent comp can successfully track isSelfHost and hide / show the terms / privacy policy checkbox
* PM-8367 - TODO cleanup
* PM-8367 - Registration start docs - stage gate is two words.
* PM-8367 - Per working session with Will, move top level provided services to app level instead of module level to solve dialog null injector errors.
* PM-8367 - Storybook working for self hosted env dialog
* PM-8367 - Add dialog scroll feature to bitDialog and implement in self hosted env dialog.
* PM-8367 - Revert bit dialog changes and scroll implementation.
* PM-8367 - Tweak registration start docs
* PM-8367 - Remove unused changeDetectorRef
* PM-8367 - Add docs per PR feedback
* PM-7392 - EncryptSvc - add new method for detecting if a simple string is an enc string.
* PM-7392 - TokenSvc - add checks when setting and retrieving the access token to improve handling around the access token encryption.
* PM-7392 - (1) Clean up token svc (2) export access token key type for use in tests.
* PM-7392 - Get token svc tests passing; WIP more tests to come for new scenarios.
* PM-7392 - Access token secure storage to disk fallback WIP but mostly functional besides weird logout behavior.
* PM-7392 - Clean up unnecessary comment
* PM-7392 - TokenSvc - refresh token disk storage fallback
* PM-7392 - Fix token service tests in prep for adding tests for new scenarios.
* PM-7392 - TokenSvc tests - Test new setRefreshToken scenarios
* PM-7392 - TokenSvc - getRefreshToken should return null or a value - not undefined.
* PM-7392 - Fix test name.
* PM-7392 - TokenSvc tests - clean up test names that reference removed refresh token migrated flag.
* PM-7392 - getRefreshToken tests done.
* PM-7392 - Fix error quote
* PM-7392 - TokenSvc tests - setAccessToken new scenarios tested.
* PM-7392 - TokenSvc - getAccessToken - if secure storage errors add error to log.
* PM-7392 - TokenSvc tests - getAccessToken - all new scenarios tested
* PM-7392 - EncryptSvc - test new stringIsEncString method
* PM-7392 - Main.ts - fix circ dep issue.
* PM-7392 - Main.ts - remove comment.
* PM-7392 - Don't re-invent the wheel and simply use existing isSerializedEncString static method.
* PM-7392 - Enc String - (1) Add handling for Nan in parseEncryptedString (2) Added null handling to isSerializedEncString. (3) Plan to remove encrypt service implementation
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* PM-7392 - Remove encrypt service method
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* PM-7392 - Actually fix circ dep issues with Justin. Ty!
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* PM-7392 - TokenSvc - update to use EncString instead of EncryptSvc + fix tests.
* PM-7392 - TokenSvc - (1) Remove test code (2) Refactor decryptAccessToken method to accept access token key and error on failure to pass required decryption key to method.
* PM-7392 - Per PR feedback and discussion, do not log the user out if hte refresh token cannot be found. This will allow users to continue to use the app until their access token expires and we will error on trying to refresh it. The app will then still work on a fresh login for 55 min.
* PM-7392 - API service - update doAuthRefresh error to clarify which token cannot be refreshed.
* PM-7392 - Fix SetRefreshToken case where a null input would incorrectly trigger a fallback to disk.
* PM-7392 - If the access token cannot be refreshed due to a missing refresh token or API keys, then surface an error to the user and log it so it isn't a silent failure + we get a log.
* PM-7392 - Fix CLI build errors
* PM-7392 - Per PR feedback, add missing tests (thank you Jake for writing these!)
Co-authored-by: Jake Fink <jfink@bitwarden.com>
* PM-7392 - Per PR feedback, update incorrect comment from 3 releases to 3 months.
* PM-7392 - Per PR feedback, remove links.
* PM-7392 - Per PR feedback, move tests to existing describe.
* PM-7392 - Per PR feedback, adjust all test names to match naming convention.
* PM-7392 - ApiService - refreshIdentityToken - log error before swallowing it so we have a record of it.
* PM-7392 - Fix copy for errorRefreshingAccessToken
* PM-7392 - Per PR feedback, move error handling toast responsibility to client specific app component logic reached via messaging.
* PM-7392 - Swap logout reason from enum to type.
* PM-7392 - ApiService - Stop using messaging to trigger toast to let user know about refresh access token errors; replace with client specific callback logic.
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* PM-7392 - Per PR feedback, adjust enc string changes and tests.
* PM-7392 - Rename file to be type from enum
* PM-7392 - ToastService - we need to await the activeToast.onHidden observable so return the activeToast from the showToast.
* PM-7392 - Desktop AppComp - cleanup messaging
* PM-7392 - Move Logout reason custom type to auth/common
* PM-7392 - WIP - Enhancing logout callback to consider the logout reason + move show toast logic into logout callback
* PM-7392 - Logout callback should simply pass along the LogoutReason instead of handling it - let each client's message listener handle it.
* PM-7392 - More replacements of expired with logoutReason
* PM-7392 - More expired to logoutReason replacements
* PM-7392 - Build new handlers for displaying the logout reason for desktop & web.
* PM-7392 - Revert ToastService changes
* PM-7392 - TokenSvc - Replace messageSender with logout callback per PR feedback.
* PM-7392 - Desktop App comp - replace toast usage with simple dialog to guarantee users will see the reason for them being logged out.
* PM-7392 - Web app comp - fix issue
* PM-7392 - Desktop App comp - don't show cancel btn on simple dialogs.
* PM-7392 - Desktop App comp - Don't open n simple dialogs.
* PM-7392 - Fix browser build
* PM-7392 - Remove logout reason from CLI as each logout call handles messaging on its own.
* PM-7392 - Previously, if a security stamp was invalid, the session was marked as expired. Restore that functionality.
* PM-7392 - Update sync service logoutCallback to include optional user id.
* PM-7392 - Clean up web app comp
* PM-7392 - Web - app comp - only handle actually possible web logout scenarios.
* PM-7392 - Browser Popup app comp - restore done logging out message functionality + add new default logout message
* PM-7392 - Add optional user id to logout callbacks.
* PM-7392 - Main.background.ts - add clarifying comment.
* PM-7392 - Per feedback, use danger simple dialog type for error.
* PM-7392 - Browser Popup - add comment clarifying expectation of seeing toasts.
* PM-7392 - Consolidate invalidSecurityStamp error handling
* PM-7392 - Per PR feedback, REFRESH_ACCESS_TOKEN_ERROR_CALLBACK can be completely sync. + Refactor to method in main.background.
* PM-7392 - Per PR feedback, use a named callback for refreshAccessTokenErrorCallback in CLI
* PM-7392 - Add TODO
* PM-7392 - Re-apply bw.ts changes to new service-container.
* PM-7392 - TokenSvc - tweak error message.
* PM-7392 - Fix test
* PM-7392 - Clean up merge conflict where I duplicated dependencies.
* PM-7392 - Per discussion with product, change default logout toast to be info
* PM-7392 - After merge, add new logout reason to sync service.
* PM-7392 - Remove default logout message per discussion with product since it isn't really visible on desktop or browser.
* PM-7392 - address PR feedback.
---------
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Added select-payment-method.component in shared lib
Because we're going to be implementing the same functionality for providers and orgs/users, I wanted to start moving some of this shared functionality into libs so it can be accessed in both web and bit-web. Additionally, the Stripe and Braintree functionality has been moved into their own services for more central management.
* Added generalized manage-tax-information component to shared lib
* Added generalized add-account-credit-dialog component to shared libs
* Added generalized verify-bank-account component to shared libs
* Added dialog for selection of provider payment method
* Added provider-payment-method component
* Added provider-payment-method component to provider layout
* add initial type filter
- use `bit-select` while the chip component is being developed
* get cipherTypes$ from service
- integrate with user settings
* initial add of folder selection
* initial add of vault selection
* initial add of collections filter
* update `VaultPopupListFilterService` to `VaultPopupListFiltersService`
* integrate hasFilterApplied$
* intermediate commit of integration to the filters component
* do not return the tree when the value is null
* return null when the updated option is null
* update vault-popup-list to conform to the chip select structure
* integration of bit-chip-select
* move "no folder" option to the end of the list
* show danger icon for deactivated organizations
* show deactivated warning when the filtered org is disabled
* update documentation
* use pascal case for constants
* store filter values as full objects rather than just id
- This allows secondary logic to be applied when filters are selected
* move filter form into service to be the source of truth
* fix tests after adding "jest-preset-angular/setup-jest"
* remove logic to have dynamic cipher type filters
* use ProductType enum
* invert conditional for less nesting
* prefer `decryptedCollections$` over getAllDecrypted
* update comments
* use a `filterFunction$` observable rather than having to pass filters back to the service
* fix children testing
* remove check for no folder
* reset filter form when filter component is destroyed
* add takeUntilDestroyed for organization valueChanges
* allow takeUntilDestroyed to use internal destroy ref
- The associated unit tests needed to be configured with TestBed rather than just `new Service()` for this to work
* use controls object for type safety
* PM-8358 - UserVerificatonFormInput - fix incorrect init logic. We needed to execute the processSecretChanges logic to convert null into { type: 0, secret: null } (VerificationWithSecret) for all non-biometric verification flows. .
* PM-8358 - UserVerificationService - verifyUser(...) - throw error if called with null. It should only happen if a dev makes a mistake in theory.
* Add Helper For Preparing a Record For Use in `forkJoin`
* Update & Test CryptoService Changes
* Delete Unused Code
* Update DeviceTrustService
* Update CipherService
* Make `userPublicKey$` Public
* Rename convertValues File
* Update libs/common/src/platform/abstractions/crypto.service.ts
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* Add `convertValues` Tests
* Add Doc Comments
* Convert to `function`'s
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* Fix Test Typos
* Add param doc
* Update Test Name
* Add `@throws` Docs
---------
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* Create and register @bitwarden/generator-core
- Create libs/tools/generator/core
- Register new library within tsconfigs
- Register new library within eslint.configs
* Create and register @bitwarden/generator-extensions
- Create libs/tools/generator/extensions
- Register new library within tsconfigs
- Register new library within eslint.configs
* Create and register @bitwarden/generator-components
- Create libs/tools/generator/components
- Register new library within tsconfigs
- Register new library within eslint.configs
* Update libs/tools/generator/components/package.json
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
* Update libs/tools/generator/extensions/package.json
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
* Add empty barrel files for new libs
* Fix extension of test.environment
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
Fastmail API returns and error when passed a null value in forDomain.
Empty string is the preferred blank option.
Co-authored-by: yara <ybeadenkopf@fastmailteam.com>
* use deep linked url for org invite instead of separate state
* remove organization invite state & fix tests
* clear login redirect for SSO JIT users since they are accepted when setting MP
* create accept org invite service and consolidate components in module
* finish switch to accept org invite service
* move logic to accept org service
* the rest of the owl
* clear org invite along with deep linked route
* pr feedback
* fix test and add error to catch null invite
* pr feedback
* clear stored invite if it doesn't match provided one
* add hostname to footer via env service
* add logic for showing/hiding environment
* add docs
* add web env-selector
* refactor to use one slot for env-selector
* add storybook docs
* add env hostname to stories
* remove sample route
* Change `object` to `Record<string, unknown>`
* Change `object` to `Record<string, unknown>` Pt. 2
* Update ForegroundSyncService
- Manage finish message in the listener to more gaurantee a message back
- Make the timeout much longer
- Allow it to throw if the background sync service threw
---------
Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
* Create the send-ui library package
Create folder
Create package.json
Create jest config
Create tsconfig and tsconfig.spec.json
Create README
Add empty barrel file for exporting future members
* Register @bitwarden/send-ui with all clients and libs
* Register with eslint
* Fix linting issue with README
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Make export.component a standalone component
Fix lint issue with takeUntil
* Create shareable export.component.html
Copied existing export.component.html as that has already been migrated to use the component library components
Strip the markup from the dialog and the submit-button
* Add outputs to inform the hosting component about certain events (submit, loading, disabled)
Emit successful Export
Expose a form-id so the hosting component can bind to this form
Fix name of output
* Ensure that the file gets prefixed with `org`when exporting from an organization
* When exporting from an organization ensure Organization_ClientExportedVault is collected
* Add comments to the components outputs
* Better way of addressing the previously fixed lint issue
* Fix disabling the form not emitting the formDisabled state
* Add better comments to Outputs based on PR feedback
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* PM-5086 - WIP start on registration start component
* PM-5086 - more WIP progress on registration start comp
* PM-5086 - Setup secondary component
* PM-5086 - (1) Validation working (2) States implemented (3) 2nd state for check email mostly completed except for correct icon
* PM-5086 - Registration Start - check email state - update icon to be correct from figma.
* PM-5086 - Refactor self hosted conditional + actually hide the checkbox if it is self hosted.
* PM-5086 - WIP good progress on getting browser & desktop creating account on logic working.
* PM-5086 - Accessibility pass + WIP on region selector
* PM-5086 - Accessibility pass with Danielle
* PM-5086 - Migrate env selector logic to own component.
* PM-5086 - Update AnonLayoutWrapperComp import
* PM-5086 - Remove unncessary focus.
* PM-5086 - WIP first draft of registration env selector; name might change to differentiate it from existing env selector.
* PM-5086 - Rename env selector to be more clear and use registration-env-selector instead.
* PM-5086 - (1) Export registration env selector (2) Change comp name not just file name.
* PM-5086 - Create new registration page stub
* PM-5086 - Fix build issue where select module was missing from new registration env selector.
* PM-5086 - Registration --> registration start.
* PM-5086 - Add missing translation from registration-start-secondary-component to desktop & browser.
* PM-5086 - Add missing translations
* PM-5086 - Registration Env Selector - forms require form groups. duh.
* PM-5086 - Registration Env Selector - working now.
* PM-5086 - Registration Start desktop mostly working with env selector issues.
* PM-5086 - Registration start - get self hosted env dialog to close on close click. Backdrop click doesn't work but escape does still.
* PM-5086 - TODO: figure out if there is a better way to get the dialog to close.
* PM-5086 - Registration start - get goBack working to properly re-show env selector
* PM-5086 - Self Hosted Env Comp - re-emit current env on close so that select based env selectors can reset
* PM-5086 - RegistrationEnvSelector - Refactor init logic to also listen for env updates so that the user's choices on the self hosted settings dialog get communicated to this comp
* PM-5086 - Registration Start Desktop - Don't allow users to close dialog via escape as we need them to either close or save to get the env service to set the env correctly.
* PM-5086 - Browser Registration Start Page stub
* PM-5086 - Registration Start comp - storybook added
* PM-5086 - Remove links to start-registration as we aren't ready to implement that yet.
* PM-5086 - Revert environment comp changes.
* PM-5086 - Delete registration start pages.
* PM-5086 - Test removing PreloadedEnglishI18nModule to see if it fixes test failures
* PM-5086 - Try to resolve issues w/ importing PreloadedEnglishI18nModule into RegistrationStartComponent storybook stories file.
* PM-5086 - Allow translations to be imported for all libs.
* PM-5086 - Remove comment from JSON
* PM-5086 - TODO cleanup
* PM-5086 - Per PR feedback, fix display issues by using correct classes.
* PM-5086 - Fix SVG per PR feedback
* PM-5086 - Remove unnecessary methods
* PM-5086 - RegistrationEnvSelectorComponent - per PR feedback, properly type null in form group
* [AC-2302] Move organization-auth-request.service to bit-common folder
* [AC-2302] Rename organization-auth-request.service to organization-auth-request-api.service
* [AC-2302] Move logic from component to organization-auth-request.service
* [AC-2302] Fix import path in OrganizationAuthRequestService
* [AC-2302] Move imports to OrganizationsModule and delete unused CoreOrganizationModule
* [AC-2302] Move the call to get userResetPasswordDetails into OrganizationAuthRequestService
* [AC-2302] Remove @Injectable() and manually configure dependencies
* [AC-2302] Add OrganizationAuthRequestService unit tests first draft
* [AC-2302] Refactor device-approvals.component.ts to remove unused imports
* [AC-2302] Set up jest on bit-common and add unit tests for OrganizationAuthRequestService
* [AC-2302] Add bit-common to jest.config.js
* [AC-2302] Update organizations.module.ts to include safeProviders declared in variable
* [AC-2302] Remove services and views folders from bit-common
* [AC-2302] Define path mapping
* Adjust an import path
The import path of `PendingAuthRequestView` in
`OrganizationAuthRequestApiService` was pointing to the wrong place. I
think this file was just recently moved, and the import didn't get
updated.
* Get paths working
* Fix import
* Update jest config to use ts-jest adn jsdom
* Copy-paste path mappings from bit-web
* Remove unnecessary test setup file
* Undo unnecessary change
* Fix remaining path mappings
* Remove Bitwarden License mapping from OSS code
* Fix bit-web so it uses its own tsconfig
* Fix import path
* Remove web-bit entrypoint from OSS tsconfig
* Make DeviceApprovalsComponent standalone
* Remove organization-auth-request-api.service export
* Remove OrganizationsRoutingModule from DeviceApprovalsComponent imports
* Remove CoreOrganizationModule from OrganizationsModule imports
* Remove NoItemsModule from OrganizationsModule imports
* Use ApiService from JslibServicesModule
* Update providers in device-approvals.component.ts
* Add method to retrieve reset password details for multiple organization users
* Add organizationUserId property to OrganizationUserResetPasswordDetailsResponse class
* Rename ResetPasswordDetails to AccountRecoveryDetails
---------
Co-authored-by: Addison Beck <hello@addisonbeck.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>