* PM-5242 - First working draft of copying out web CL implementation of user verification form and dialog components into standalone libs/auth components which could be used in any client.
* PM-5242 - Rename UserVerificationFormComponent to UserVerificationFormInputComponent b/c it doesn't actually have a form and is meant to slot into a form as an input.
* PM-5242 - Update libs/auth angular index to take renamed component into account
* PM-5242 - Clean up UserVerificationDialogComponent as have much cleaner design approach now (maintain existing func while simply adding new requirements for client side validation for passkeys)
* PM-5242 - UserVerificationFormInput component - WIP draft of new client and server split of user verification logic
* PM-5242 - UserVerificationFormInput - WIP - Lots of progress on client side verification layout - more to do
* PM-5242 - UserVerificationFormInputComponent - Add hasMultipleVerificationMethods property so we can only show alternate methods if user has them.
* PM-5242 - UserVerificationFormInputComponent - rename hasMultipleVerificationMethods to hasMultipleClientVerificationOptions
* PM-5242 - Add new user verification biometrics fingerprint icon with proper secondary fill so it displays properly on all themes.
* PM-5242 - Create enum for tracking client user verification states
* PM-5242 - UserVerificationFormInputComponent - WIP - (1) Got biometrics layout working except for error state (2) Emitting active client verification option and biometrics result to dialog (3) Properly identifying if biometrics is enabled in a platform agnostic way (4) Translations TODO
* PM-5242 - UserVerificationDialogComponent - (1) Wire up new inputs and outputs for UserVerificationFormInput (2) Don't show submit button when clientside biometrics verification active
* PM-5242 - UserVerificationFormInputComponent - wired up biometrics failure and retry handling + re-arranged comp properties to put inputs & outputs at the top
* PM-5242 - UserVerificationFormInput component - Add logic to prevent currently active client verification method from being shown an option
* PM-5242 - UserVerificationFormInput - adjust margins
* PM-5242 - User verification dialog and form input comps - replace Verification with VerificationWithSecret type where applicable
* PM-5242 - UserVerificationFormComp - Default to server for backwards compatibility and to avoid requiring the input at all
* PM-5242 - UserVerificationFormInputComp - (1) Rename processChanges to processSecretChanges (2) Short circuit processSecretChanges when biometrics is active (3) Add new function for determining type of verification that has a secret.
* PM-5242 - UserVerificationDialog - Support custom, optional callout in dialog body.
* PM-5242 - UserVerificationDialogComp - support custom confirm button text and type.
* PM-5242 - UserVerificationDialog - Add user verification dialog result type to allow for handling all possible verification scenarios
* PM-5242 - UserVerificationFormInputComp - tweak comment
* PM-5242 - UserVerificationFormInput comp html - add placeholder text for no client verifications found scenario
* PM-5242 - UserVerificationDialogComponent - (1) Add confirm & cancel to dialog result (2) Add cancel method vs using bitDialogClose for specificity (3) Adjust naming of output property to properly specify that it is scoped to client verification (4) Adjust layout of dialog html to handle when no client side verification methods are found.
* PM-5242 - UserVerificationFormInput - Clean up test code
* PM-5242 - UserVerificationFormInput - For server verification, we don't need to check if the user has a local master key hash as we will generate a hash to send to the server for comparison.
* PM-5242 - UserVerificationFormInput html - Remove now unnecessary dev warning as I've provided a default
* PM-5242 - UserVerification Dialog & Form Input - add translations on all clients for all visible text.
* PM-5242 - UserVerificationFormInput html - remove no active client verification handling from form input comp as it is instead emitted upwards to parent dialog component to be handled there.
* PM-5242 - UserVerificationDialogComp - (1) Make UserVerificationDialogResult.noAvailableClientVerificationMethods optional because it isn't needed in cancel flows (thanks Will) (2) Modify static open to intercept closed observable event in order to always return a UserVerificationDialogResult as BitDialog returns empty string when the user clicks the x
* PM-5242 - UserVerificationDialogComp - Simplify dialog param names to remove redundant dialog
* PM-5242 - UserVerificationDialogParams - update comments to match new names
* PM-5242 - UserVerificationDialog Storybook - WIP first draft
* PM-5242 - UserVerificationDialogStoryComponent - WIP - try out having imports the same as the standalone component
* PM-5242 - UserVerificationDialogStoryComponent - more WIP - building now - some stuff displaying
* PM-5242 - UserVerificationDialogStoryComponent - some progress on providers setup
* PM-5242 - Not going to use storybook for user verification dialog
* PM-5242 - UserVerificationDialogComp - move types into own file + add docs
* PM-5242 - Update auth index to export user-verification-dialog.types
* PM-5242 - UserVerificationFormInput & UserVerificationService - Extract out getAvailableVerificationOptions logic into service
* PM-5242 -UserVerificationDialogComponent - Update close logic to handle escape key undefined scenario
* PM-5242 - UserVerificationFormInput - add getInvalidSecretErrorMessage for properly determining invalid secret translation
* PM-5242 - UserVerificationDialogComp - Refactor submit logic to handle different return methodologies in existing MP and OTP user verification service code vs new PIN flow (e.g., throwing an error instead of returning false)
* PM-5242 - PinCryptoService - change error logs to warnings per discussion with Justin
* PM-5242 - UserVerificationFormInput - Biometrics flow on desktop - remove accidentally added period in couldNotCompleteBiometrics translation key.
* PM-5242 - UserVerificationFormInput HTML - Re-arrange order of other client verification options to match design
* PM-5242 - UserVerificationFormInputComponent - Reset inputs as untouched on change of client verification method.
* PM-5242 - UserVerificationDialogComponent - Remove TODO as existing secret change logic turns invalidSecret false when biometrics is swapped to.
* PM-5242 - UserVerificationFormInputComponent - getInvalidSecretErrorMessage - fix PIN error message not being returned.
* PM-5242 - UserVerificationDialogComponent - Add documentation and examples to open method.
* PM-5242 - UserVerificationDialogComponent - tweak open docs
* PM-5242 - Remove accidental period from translation keys on browser & web
* PM-5242 - UserVerificationFormInputComponent - OTP flow needed button module to work
* PM-5242 - UserVerificationDialogParams - Add docs explaining that noAvailableClientVerificationMethods is only for desktop & browser.
* PM-5242 - User-verification-form-input - Adjust layout to meet new design requirements - (1) On load, send OTP without user clicking a button (2) Allow resending of the codes (3) show a code sent message for 3 seconds
* PM-5242 - Browser User Verification - Instantiate PinCryptoService and UserVerification service AFTER instantiating vaultTimeoutSettingsService so that it isn't undefined at run time.
* PM-5242 - JslibServices Module - UserVerificationService - add missing PlatformUtilsServiceAbstraction dependency.
* PM-5242 - Desktop Native Messaging Service - Wrap biometric getUserKeyFromStorage call in try catch because it throws an error if the user cancels the biometrics prompt and doesn't send a response to the browser extension when using the biometrics unlock bridge to the desktop app and OS.
* PM-5242 - Browser Extension - NativeMessagingBackground - if the desktop biometricUnlock command is executed with a canceled (not adjusting misspelling to keep side effects at a min) response, don't bother continuing.
* PM-5242 - BrowserCryptoService - When retrieving the user key via desktop biometrics, return null for user key if the user fails or cancels the biometrics prompt. Otherwise, if there is a user key in memory after unlock, biometrics user verification will always just return the user key from state regardless of if the user has successfully passed the biometrics prompt or not.
* PM-5242 - BrowserCryptoService - extra comments
* PM-5242 - Clean up translations - (1) Remove unused defaultUserVerificationDialogConfirmBtnText (2) Refactor name of defaultUserVerificationDialogTitle to just be verificationRequired which matches existing naming conventions.
* PM-5242 - CLI - fix order of service instantiations to ensure that vaultTimeoutSettingsService isn't undefined for PinCryptoService and UserVerificationService
* PM-5242 - Rename UserVerificationDialogParams to UserVerificationDialogOptions to match existing naming conventions of other CL comps.
* PM-5242 - UserVerificationDialogComponent - dialogParams renamed to dialogOptions
* PM-5242 - UserVerificationService Abstraction - Per PR feedback, use keyof for verificationType
* PM-5242 - UserVerificationBiometricsIcon - Per PR feedback, use https://jakearchibald.github.io/svgomg/ to optimize SVG by 50%.
* PM-5242 - Per PR feedback, clarify UserVerificationDialogOptions.clientSideOnlyVerification comment.
* PM-5242 - UserVerificationTypes - Add comments clarifying all text passed to the UserVerificationDialog are translation keys
* PM-5242 - UserVerificationDialogComp - fix extra new line per PR feedback
* PM-5242 - UserVerificationDialogTypes - per PR feedback and discussion with Will M., export ButtonType from CL so we (and consumers of the dialog) can properly import it via standard CL import.
* PM-5242 - BrowserCryptoService - Adjust comments per PR feedback.
* PM-5242 - UserVerificationDialogComponent - make ActiveClientVerificationOption readonly as it only for component html
* PM-5242 - UserVerificationDialogComp html - finish comment
* PM-5242 - BrowserCryptoService - add returns js doc per PR feedback.
* PM-5242 - UserVerificationDialogComponent - per PR feedback, add unexpected error toast.
* PM-5242 - UserVerificationService - getAvailableVerificationOptions - update params to use keyof like abstraction
* PM-5242 - Mark all existing client specific implemetations of user verification as deprecated.
appAutofocus currently doesn't work on the bit-search component. This PR resolves this issue by introducing a FocusableElement interface components can implement, which is respected by the autofocus directive.
* Add light LinkType to link directive
* add skip link to bit-layout; update i18n for all apps
* install storybook interaction testing packages
* update storybook config
* add skiplink story to bit-layout
* update route and focus logic
* remove focus ring
* Handle switch messaging
TODO: handle loading state for account switcher
* Async updates required for state
* Fallback to email for current account avatar
* Await un-awaited promises
* Remove unnecessary Prune
Prune was getting confused in browser and deleting memory in browser on
account switch. This method isn't needed since logout already removes
memory data, which is the condition for pruning
* Fix temp password in browser
* Use direct memory access until data is serializable
Safari uses a different message object extraction than firefox/chrome
and is removing `UInt8Array`s. Until all data passed into StorageService
is guaranteed serializable, we need to use direct access in state
service
* Reload badge and context menu on switch
* Gracefully switch account as they log out.
* Maintain location on account switch
* Remove unused state definitions
* Prefer null for state
undefined can be misinterpreted to indicate a value has not been set.
* Hack: structured clone in memory storage
We are currently getting dead objects on account switch due to updating
the object in the foreground state service. However, the storage service
is owned by the background. This structured clone hack ensures that all
objects stored in memory are owned by the appropriate context
* Null check nullable values
active account can be null, so we should include null safety in the
equality
* Correct background->foreground switch command
* Already providing background memory storage
* Handle connection and clipboard on switch account
* Prefer strict equal
* Ensure structuredClone is available to jsdom
This is a deficiency in jsdom --
https://github.com/jsdom/jsdom/issues/3363 -- structured clone is well
supported.
* Fixup types in faker class
* add avatar and simple navigation to header
* add options buttons
* add app-header to necessary pages
* add back button and adjust avatar sizes
* add helper text when account limit reached
* convert magic number to constant
* add clarifying comment
* adjust homepage header styles
* navigate to previousp page upon avatar click when already on '/account-switcher'
* move account UI to own component
* add i18n
* show correct auth status
* add aria-hidden to icons
* use listbox role
* add screen reader accessibility to account component
* more SR a11y updates to account component
* add hover and focus states to avatar
* refactor hover and focus states for avatar
* add screen reader text for avatar
* add slide-down animation on account switcher close
* remove comment
* setup account component story
* add all stories
* move navigation call to account component
* implement account lock
* add button hover effect
* implement account logout
* implement lockAll accounts functionality
* replace 'any' with custom type
* add account switcher button to /home login page
* use <main> tag (enables scrolling)
* change temp server filler name
* temporarily remove server arg from account story
* don't show avatar on /home if no accounts, and don't show 'lock'/'logout' buttons if no currentAccount
* add translation and a11y to /home avatar
* add correct server url to account component
* add 'server' to AccountOption type
* Enabled account switching client-side feature flag.
* add slide-in transition to /account-switcher page
* change capitalization to reflect figma design
* make screen reader read active account email, address more capitalization
* fix web avatar misalignment
* make avatar color based on user settings and in sync with other clients
* make property private
* change accountOptions to availableAccounts for clarity
* refactor to remove 'else' template ref
* remove empty scss rule
* use tailwind instead of scss
* rename isSelected to isActive
* add 'isButton' to /home page avatar
* move files to services folder
* update import
* Remove duplicate active account button
* Move no account button to current-account component
* Always complete logging out
Fixes PM-4866
* make screenreader read off email, not name
* refactor avatar for button case
* Do not next object updates
StateService's init was calling `updateState` at multiple layers,
once overall and then again for each account updated. Because
we were not maintaining a single state object through the
process, it was ending up in a consistent, but incomplete state.
Fixed by returning the updated state everywhere. This very well
may not be all the bugs associated with this
* Treat null switch account as no active user
* Listen for switchAccountFinish before routing (#6950)
* adjust avatar style when wrapped in a button
* show alt text for favicon setting
* move stories to browser
* Send Finish Message on null
* Dynamically set active user when locking all
This is required because some user lock states are not recoverable after
process reload (those with logout timeout). This waits until reload is
occurring, then sets the next user appropriately
* Move Finished Message to Finally Block
Fix tests
* Drop problematic key migration
Fixes PM-4933. This was an instance of foreground/background collision
when writing state. We have several other fallbacks of clearing
these deprecated keys.
* Prefer location to homebrew router service
* Initialize account disk cache from background
Uses the `isRecoveredSession` bool to re-initialize foreground caches
from a background message. This avoids a lengthy first-read for
foregrounds
* PM-4865 - Browser Acct Switcher - only show lock btn for lockable accounts (#6991)
* Lock of active account first, when locking multiple.
Fixes PM-4996
* Fix linter
* Hide lock now for locked users (#7020)
* Hide lock now for locked users
* Prefer disabling button to removing
* Add tooltip to TDE without unlock method
* Load all auth states on state init (#7027)
This is a temporary fix until the owning services can update state
themselves. It uses the presence of an auto key to surmise unlocked
state on init. This is safe since it's run only once on extension start.
* Ps/pm 5004/add load to account switcher (#7032)
* Add load spinner to account switcher
* Remove ul list icons
* Properly size account switcher in popout
* [PM-5005] Prevent Double Navigation (#7035)
* Delete Overriden Method
* Add Lock Transition
* truncate email and server name
* remove account.stories.ts (will add in separate PR)
* Do not switch user at reload if no user is active
* fix prettier issues
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
* Adjust radio groups margin
* Move hint margin to input field
* Tweak field spacing
* Add story for hint, and fix hint display
* Fix label ssue
* Revert input margin
* Re-add margin to hint
* Change font weight
* Fix required placement
* Add support for required
* Change margin of radio group
* Remove unnecessary div
* Fix long inputs cutting off
* Fix radio story
* Remove newline
---------
Co-authored-by: Will Martin <contact@willmartian.com>
* setup popover component template and basic story
* add a11y features
* add multiple positions for the popover
* add stories for open right and left
* prevent panel from hugging edges of screen
* fix typo
* add popover arrow depending on position
* add buttons to stories
* add figma preview
* move toward directive approach
* add all positions
* add header input
* add close functionality
* make standalone component
* add a11y import
* add all stories
* add story controls/args
* add module of standalone components
* gracefully handle text wrap and align close button to top for longer headings
* update semantic html
* add story for open state
* use bitIconButton
* adjust styles
* add public close method
* setup walkthrough mode
* add walkthrough mode
* revert to before walkthrough service added
* add triggerRef to stories
* change property name
* add Escape key to close events
* add initially open state
* add docs
* minor reformatting
---------
Co-authored-by: William Martin <contact@willmartian.com>
* Split up import/export into separate modules
* Fix routing and apply PR feedback
* Renamed OrganizationExport exports to OrganizationVaultExport
* Make import dialogs standalone and move them to libs/importer
* Make import.component re-usable
- Move functionality which was previously present on the org-import.component into import.component
- Move import.component into libs/importer
Make import.component standalone
Create import-web.component to represent Web UI
Fix module imports and routing
Remove unused org-import-files
* Renamed filenames according to export rename
* Make ImportWebComponent standalone, simplify routing
* Pass organizationId as Input to ImportComponent
* use formLoading and formDisabled outputs
* Emit an event when the import succeeds
Remove Angular router from base-component as other clients might not have routing (i.e. desktop)
Move logic that happened on web successful import into the import-web.component
* fix table themes on desktop & browser
* fix fileSelector button styles
* update selectors to use tools prefix; remove unused selectors
* Wall off UI components in libs/importer
Create barrel-file for libs/importer/components
Remove components and dialog exports from libs/importer/index.ts
Extend libs/shared/tsconfig.libs.json to include @bitwarden/importer/ui -> libs/importer/components
Extend apps/web/tsconfig.ts to include @bitwarden/importer/ui
Update all usages
* Rename @bitwarden/importer to @bitwarden/importer/core
Create more barrel files in libs/importer/*
Update imports within libs/importer
Extend tsconfig files
Update imports in web, desktop, browser and cli
* Lazy-load the ImportWebComponent via both routes
* Use SharedModule as import in import-web.component
* File selector should be displayed as secondary
* Use bitSubmit to override submit preventDefault (#6607)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: William Martin <contact@willmartian.com>
* When org is disabled disable the logic and show warning symbols
* fixing org enabled logic
* removing unused code
* Adding route gaurd logic and new org suspended page
* fixing lint issue
* fixing issues
* Requested changes
* adding back code that was accidentally removed from organization-switcher
* Update bitwarden_license/bit-web/src/app/secrets-manager/shared/org-suspended.component.ts
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
* Removing unused code and updating storybook to set enabled:true
* removing onDestroy
* Will's suggestions
* will's suggested change
* fix nav-item color in story
* Thomas Rittson's suggested changes
* adding back removed spaces
* Adding back white space
* updating guard
* Update bitwarden_license/bit-web/src/app/secrets-manager/guards/sm-org-enabled.guard.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* removing ununsed data
* Updating incorrect messages
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: William Martin <contact@willmartian.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* update desktop and browser swal references to use CL
* rename bit-dialog-close
* share fingerprint dialog between desktop and browser
* apply code review
* format fingerprint in template
* apply code review
* fix button color
* fix button types
* update var names
* close awaitDesktop dialog on success AND error
* add DialogService to NativeMessageHandlerService deps
* wrap browser message dialogs in ngZone.run
* wrap native messaging handler in ngzone.run
* apply code review
* fix async ngzone
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Converted add-edit send component dialog into a bit-dialog
* Updated Send AddEdit text fields to Component Library
* Migrated Share and Options fields to ComponentLibrary on SendAddEdit
* Migrated footer buttons to ComponentLibrary on SendAddEdit
* Updated web's SendAddEdit component file fields
* Replaced file upload with component library
* Changed SendAddEdit to use Reactive Forms on web
* Changed browser SendAddEdit to use ReactiveForms
* Update SendAddEdit on desktop to use ReactiveForms
* Added AppA11yTitle to button on web SendAddEdit
* Initial efflux-dates web change to ComponentLibrary
* Corrected delete button to check if it is in EditMode on SendAddEdit
* Using BitLink on options button
* Corrected typo on send add edit desktop
* Replaced efflux-dates with datetime-local input on SendAddEdit web, browser and desktop
* Removed efflux dates
* Added firefox custom date popout message on DeletionDate to SendAddEdit browser component
* moved desktop's new send data reload from send to SendAddEdit component
* removing unnecessary attributes and spans from Send AddEdit web
* removed redundant try catch from add edit and unnecessary parameter from close
* Added type for date select options
* Removed unnecessary classes and swapped bootstrap classes by corresponding tailwind classes
* Removed unnecessary code
* Added file as required field
Submit only closes popup on success
* Added pre validations at start of submit
* PM-3668 removed expiration date from required
* PM-3671 not defaulting maximum access count to 0
* PM-3669 Copying the link from link method
* Removed required tag from html and added to formgroup
* PM-3679 Checking if is not EditMode before validating if FormGroup file value is set
* PM-3691 Moved error validation to web component as browser and desktop need to show popup error
* PM-3696 - Disabling hide email when it is unset and has policy to not allow hiding
* PM-3694 - Properly setting default value for dates on Desktop when changing from an existing send
* Disabling hidden required fields
* [PM-3800] Clearing password on new send
* add bit-layout component
* update bit-layout semantics
* use bit-layout in sm-layout
* remove redundant sm-layout story
* move nav el inside of navigation component
* Apply suggestions from code review
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* remove reference to layout_frontend in bit-layout
* update stories
* Update libs/components/src/layout/layout.stories.ts
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* run prettier
---------
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* Update npm minor
* Do not update past prettier major version
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Implements a new functionality for simple configurable dialogs that allows you to set an acceptAction which triggers a pending state. To use this set acceptAction to an async method, and it will be executed on accept prior to closing the dialog.
* Update icon-button.stories.ts
separated out the icon-button stories by size, style, loading, and disabled
* restructured icon button docs to use new stories
* Add tailwind to desktop
* Add tailwind to browser
* Toy around with using CL in desktop
* Move custom css into the tailwind theme
* Revert component experiment
* Add components to browser tsconfig
* Fix build
* Updating search and select all to work together properly
* adding comment and moving filtered data below private variables
* thomas suggested changes
* making service-accounts-list the same as projects and secrest list
* changes
* Update service-accounts-list.component.ts
* removing unnecessary code
* setting active filter on set data, adding comment
* removing unused field
* Update libs/components/src/table/table-data-source.ts
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>