1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-08 09:43:42 +01:00
Commit Graph

141 Commits

Author SHA1 Message Date
Bernd Schoolmann
e83dca529b
[PM-12607] Move key rotation to km ownership (#11709)
* Move key rotation to km ownership

* Fix build

* Move userkey rotation data provider abstraction to km ownership

* Move userkey rotation data provider abstraction to km ownership

* Fix linting

* Fix CODEOWNERS for key-management web

* Remove incorrect export

* Fix import error
2024-10-26 13:47:40 +02:00
Jared Snider
877d379f86
Auth/PM-8111 - LoginComponent Refactor Bug - Fix Extension SSO (#11699)
* PM-8111 - LoginComponent Refactor - I broke the browser SSO flow - fixing it as clientId doesn't persist unless it is in state qParam.

* PM-8111 - Fix DefaultLoginComponentService tests
2024-10-24 19:02:10 -04:00
Jared Snider
1fb1be56b3
Auth/PM-12613 - Registration with Email Verification - Provider Invite Flow (#11635)
* PM-12613 - AcceptProviderComp - Add support for new registration with email verification flow.

* PM-12613 - AcceptProviderComp - Reduce required params for finish registration to minimum

* PM-12613 - RegistrationFinish - Add passthrough logic for provider invite token

* PM-12613 - Update DefaultRegistrationFinishService finishRegistration tests to assert that all web only inputs are undefined on the outgoing request model

* PM-12613 - DefaultRegistrationFinishService - finishRegistration - Add missed mapping of optional properties into buildRegisterRequest

* PM-12613 - WebRegistrationFinishService - Add tests for additional token flows.
2024-10-24 17:21:06 -04:00
rr-bw
df8f234b9e
[PM-8111] Browser Refresh: LoginComponent (#10856)
* setup new LoginComponent files in libs/auth

* update pageTitle

* handle loading email settings

* setup web-login.service.ts

* implement web onInit

* fill out webOnInit

* refactor getOrgPolicies call

* update import

* add validateEmail logic

* handle registerRoute

* add showPasswordless flag

* handle captcha

* handle startAuthRequestLogin()

* add handleMigrateEncryptionKey to default and web service

* handle submit routing (web)

* fix typo

* incorporate loginEmailService changes

* minor updates to comments for clarity

* create a defaultOnInit()

* update defaultOnInit()

* handle master password input focus

* handle post-login routing on Browser/Desktop

* handle browser/desktop syncService

* handle browser ngOnInit

* handle browser routing and basic browser template

* setup desktop router

* add template for desktop first UI state: email entry

* rename 'response' to 'authResult'

* refactor handleMigrateEncryptionKey()

* refactor captcha methods and add return types

* refactor submit logic

* refactor submit logic further to use if statements with returns instead of if...else if...else

* remove toast error on invalid form for Browser/Desktop

* refactor to handleAuthResult() method

* refactor webOnInit

* add comment to revisit ngOnInit logic

* refactor handlCaptchaRequired()

* create a LoginSecondaryContentComponent for AnonLayout use

* minor formatting for consistency

* add clarifying comment to handleAuthResult()

* minor refactor to use destructuring

* setup desktopOnInit()

* add continue() method

* handle desktop ngOnDestroy()

* add clarifying comment regarding secondary content

* fill out desktop template and submit()

* add descriptive comment to top of HTML file

* refactor to use a uiState enum for UI states

* handle oss-routing swap

* handle registerRoute$ in secondary content

* web template modifications

* change email validation to only run on submit (or when clicking continue button)

* add dynamic anon-layout wrapper data

* remove static element ref

* desktop HTML template updates

* remove 'showPassword' property b/c now handled by bitPasswordInputToggle

* Extension: setup EmailEntry state UI

* Extension: setup MasterPasswordEntry state UI

* ensure full sync happens on all clients before navigation

* update icon stroke color

* change old components to V1

* remove 'V2' from new component

* update captcha iframe on all clients

* add browser redirect from /home to /login with FF on

* add todo comment regarding browser template

* add launchSsoBrowser to extension template

* move extension launchSsoBrowserWindow() to extension service

* cleanup & comments

* add launchSsoBrowserWindow() to default service

* setup launchSsoBrowserWindow() for Desktop

* refactor to use toastService

* remove unnecessary service injection

* rename LoginService to LoginComponentService to avoid confusion with the LoginStrategyService

* add jsdocs to LoginComponentService

* rename loginService prop to loginComponentService

* Add vault icon to anon layout.

* Prevent email address validation on blur.

* Fix comment typo.

* Prefill email field when "create account" is clicked.

* Use factory function to provide LoginEmailService.

* Add test for RegisterFormComponent.

* Remove back button todo.

* Consolidate clearing loginEmailService values and routing

* Remove unnecessary navigation.

* Fix client navigation after login.

* Consolidate login templates.

* Break up LoginComponent into client-specific services.

* Rename login.component to login-v1.component

* Rename login.component to login-v1.component

* Revert "Rename login.component to login-v1.component"

This reverts commit 9a277d6ca5.

* Revert "Rename login.component to login-v1.component"

This reverts commit 588a7af906.

* Rename login.component to login-v1.component except browser.

* Comment out debug code.

* Remove debug code.

* Rename login.component to login-v1.component for browser.

* Add login-with-passkey route to desktop.

* Set feature flag to false.

* Fix linting errors.

* Populate email on registration start form.

* Implement email population on all clients add add safeProviders.

* Remove comment re. passing email to registration.

* Add unauthUiRefreshRedirect utility function.

* Add transparent border.

* Merge main and add satisfies RouteDataProperties

* PM-8111 - Extension - AppRoutingModule - Home route now redirects conditionally based on unauthenticated ui refresh feature flag.

* PM-8111 - New Login Comp + Login Comp Svc - (1) Refactor naming and returns of getShowPasswordlessFlag to isLoginViaAuthRequestSupported (2) Replace showPasswordless with better composed variable names.

* PM-8111 - TODO cleanup

* PM-8111 - (1) Cleanup DefaultLoginComponentService (2) Sso Connector now checks client id property instead of reading it from state

* PM-8111 - Two TODO cleanups

* Remove specific client services.

* Add isLoginWithPasskeySupported function to reduce client type checking in template.

* Add styles missing from Browser to Create Account link.

* Confirmed inline form errors working and removing todo comments.

* Convert refactoring todo-rr-bw to standard todos.

* Add login component services tests.

* Cleanup formatting and remove unused provider.

* Add comment to explain call to setLoginEmail.

* Rearrange imports to fix lint error.

* Adjust styles for password hint link.

* Address PR feedback: use strict comparison.

* Ensure Login with Passkey button is shown by setting clientType.

* Update "continue" button from "submit" to "button" type.

* Ensure Passkey login available for web and desktop.

* Validate email on enter keypress.

* Use click event to trigger goToHint.

* Restructure handAuthResult to ensure we redirect to vault.

* Add await to saveEmailSettings function.

* Directly set clientType in individual login component services.

* Get clientType via service.

* Add back button.

* Remove hardcoded colors from Vault Icon

* Removing register component changes.

* Removing register component changes.

* Ensure isLoginWithPasskeySupported is only returns true for web client.

* Remove Web/Desktop comment from html template

* Update Storybook with initialLoginEmail

* Fix translation error

* Add test for unauthUiRefreshRedirect.

* Rename goAfterLogIn to evaluatePassword and borrow logic from lock component.

* Add DefaultLoginComponent tests.

* Integrate changes to translations.

* Simplify ngOnInit: remove webOnInit and move getLoginWithDevice to defaultOnInit

I couldn't find any usages of qParams.org or qParams.sponsorshipToken on QA (signing up for family membership, creating organization, manually modifying query params), so I think these are safe to remove.

* Fix translations.

* Clean up and flush out register form tests.

* Update variable name.

* Remove unused enforcedPasswordPolicyOptions property.

* Run prettier.

* Add back safeProviders for LoginEmailService

* Remove duplicate import.

* Update v1 web login title.

* Adjust overlay position of EnvironmentSelectorComponent for new layout.

Since the switcher is located at the bottom of the screen we need to position it up above the trigger button so that it is not cut off.

* Add new wave icon

* Only send email in query parameters if set.

* Remove test/debug code.

* Replace loggedEmail with this.emailFormControl.value.

* Move getLoginWithDevice call to loadEmailSettings.

* Replace loggedEmail with this.emailFormControl.value.

* Add todo comment re. inline errors.

* Remove unused setPreviousUrl function.

* Remove height / width from vault icon svg.

* Use continue method unanimously

* WIP remove validated email&  display extension back button

* Simplify getting query params

* Rework ExtensionAnonLayoutWrapperDataService to use BehaviorSubject

* Simplify validateEmail method

* Hide back button on init

* Revert "Hide back button on init"

This reverts commit e8de5e2bfc.

* Revert "Simplify validateEmail method"

This reverts commit c9141a1cb5.

* Revert "Rework ExtensionAnonLayoutWrapperDataService to use BehaviorSubject"

This reverts commit 8889ed3d3c.

* simplify validateEmail method

* Add primary / accent colors to wave icon

* Remove debug code

* PM-8111 - Tweak ShowBackButton to work

* PM-8111 - LoginCompService - finish removal of setPreviousUrl from implementations.

* PM-8111 - (1) Remove overriden default logo in anon layout (2) Update routing modules to have proper default login logo (3) LoginComp - update toggleLoginUiState to include logic to swap the icon back and forth as user navigates.

* PM-8111 - LoginComp - on UI state change from MP entry to email entry, remove subtitle (this isn't supported yet, but it will be)

* PM-8111 - LoginComp - Simplify toggleLoginUiState

* PM-8111 - LoginComponent - Add known device logic into UI state change handler

* PM-8111 - LoginComp - (1) Refactor name of getLoginWithDevice to be more accurate as getKnownDevice (2) Refactor calls to getKnownDevice to only occur if loginViaAuthRequestSupported

* PM-8111 - LoginComp - add getKnownDevice docs

* PM-8111 - LoginComponent - tweak docs

* PM-8111 - LoginComp - Continue() - remove toast as the validation on submit logic currently shows validation errors - toast is extra and not needed.

* Add isLoginViaAuthRequestSupported for DesktopLoginComponentService

* Remove validating email on init

* PM-8111 - ExtensionLoginComponentService - add tests for showBackButton

* PM-8111 - style tweaks

* PM-8111 - Extension - Refactor Overlay position to include extension default const to avoid repetition.

* PM-8111 - Desktop AppRouting Module - remove login with passkey route as it isn't supported on desktop.

* PM-8111 - Desktop - add default overlay position const

* PM-8111 - DesktopLoginCompSvc - tests were not actually testing super method calls + finish testing launchSsoBrowserWindow

* PM-8111 - Desktop Main.ts - remove dev test code

* PM-8111 - WebLoginCompSvcTests - add success test cases for getOrgPolicies

* PM-8111 - Remove duplicate translation keys

* PM-8111 - DefaultLoginComponentSvcTests - add missing test

* PM-8111 - DefaultLoginComponentServiceTests - add describes

* PM-8111 - LoginSecondaryContentComponent  - Add missing bitLink

* Update to test both browser and desktop

* Remove registration form test

* Remove aliasing CryptoFunctionService and PlatformUtilsService as abstractions

* Remove aliasing PlatformUtilsService and CryptoFunctionService as abstractions

---------

Co-authored-by: Alec Rippberger <alec@livefront.com>
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
Co-authored-by: Alec Rippberger <127791530+alec-livefront@users.noreply.github.com>
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
2024-10-24 15:53:34 -04:00
Bernd Schoolmann
b486fcc689
[Pm-13097] Rename cryptoservice to keyservice and move it to km ownership (#11358)
* Rename cryptoservice to keyservice

* Rename cryptoservice to keyservice

* Move key service to key management ownership

* Remove accidentally added file

* Fix cli build

* Fix browser build

* Run prettier

* Fix builds

* Fix cli build

* Fix tests

* Fix incorrect renames

* Rename webauthn-login-crypto-service

* Fix build errors due to merge conflicts

* Fix linting
2024-10-24 19:41:30 +02:00
Jared Snider
c16d1e0e74
AnonLayoutWrapperComponents - Add reset support for null values (#11651) 2024-10-21 18:52:07 -04:00
Jared Snider
496bc74b51
PM-13820 - RegistrationStartSecondaryComp - add bitLink to link (#11626) 2024-10-18 15:08:08 -04:00
Jared Snider
ad40db9ecf
PM-13368 - Registration with Email Verification - Registration Finish - Add 2FA support (#11614) 2024-10-18 10:17:23 -04:00
Bernd Schoolmann
e8f0135d50
[PM-12806] Enforce 5000 iteration minimum for prelogin (#11332)
* Enforce 5000 iteration minimum for prelogin

* Fix tests

* Add more extensive tests

* Add loginstrategy prelogin downgrade test
2024-10-17 09:58:07 -04:00
Jared Snider
4b67cd24b4
Auth/PM-8112 - UI refresh - Registration Components (#11353)
* PM-8112 - Update classes of existing registration icons

* PM-8112 - Add new icons

* PM-8112 - Export icons from libs/auth

* PM-8112 - RegistrationStart - Add new user icon as page icon

* PM-8112 - Replace RegistrationCheckEmailIcon with new icon so it displays properly

* PM-8112 - RegistrationFinish - Add new icon across clients

* PM-8112 - Registration start comp - update page icon and page title on state change to match figma

* PM-8112 - RegistrationFinish - adding most of framework for changing page title & subtitle when an org invite is in state.

* PM-8112 - Add joinOrganizationName to all clients translations

* PM-8112 - RegistrationFinish - Remove default page title & subtitle and let onInit logic figure out what to set based on flows.

* PM-8112 - RegistrationStart - Fix setAnonLayoutWrapperData calls

* PM-8112 - RegistrationFinish - simplify qParams init logic to make handling loading and page title and subtitle setting easier.

* PM-8112 - Registration Link expired - move icon to page icon out of main content

* PM-8112 - RegistrationFinish - Refactor init logic further into distinct flows.

* PM-8112 - Fix icons

* PM-8112 - Extension AppRoutingModule - move sign up start & finish routes under extension anon layout

* PM-8112 - Fix storybook

* PM-8112 - Clean up unused prop

* PM-8112 - RegistrationLockAltIcon tweaks

* PM-8112 - Update icons to have proper styling

* PM-8112 - RegistrationUserAddIcon - remove unnecessary svg class

* PM-8112 - Fix icons
2024-10-16 18:28:27 -04:00
Jared Snider
7297d0fccd
Auth/PM-13318 - AnonLayoutWrapperData Refactor to add full Translation support (#11513)
* PM-13318 - AnonLayoutWrapperData refactor to support all possible string scenarios (untranslated string, translated string, and translated string with placeholders)

* PM-13318 - Fix accidental check in

* PM-13318 - Revert the correct change.

* PM-13318 - Fix test failures
2024-10-11 16:02:47 -04:00
Jared Snider
18522e5165
PM-13252 - AnonLayout - Style tweaks to fix scrollbars on browser + add typography to footer content + misc minor refactors. (#11449) 2024-10-08 14:51:08 -04:00
Jared Snider
4bd2e158c0
PM-12694 - Fix AnonLayoutStorybook to add router module and hideLogo toggling support (#11368) 2024-10-02 16:17:20 -04:00
Alec Rippberger
acd47c2b79
[PM-12694] Modify logo on AnonLayout to direct to base route on click (#11263)
* Add "back" functionality for Desktop.

* Return user to email field when logo is clicked in Web.

* Update function name.

* Move hideLogo to anchor wrapper.

* Use "/" route for logo back link.
2024-10-02 08:00:37 -05:00
Jared Snider
9ff1db7573
Auth/PM-9449 - UI Refresh + Client component consolidation into new LockV2 Component (#10451)
* PM-9449 - Init stub of new lock comp

* PM-9449 - (1) Add new lock screen title to all clients (2) Add to temp web routing module config

* PM-9449 - LockV2Comp - Building now with web HTML

* PM-9449 - Libs/Auth LockComp - bring in all desktop ts code; WIP, need to stand up LockCompService to facilitate ipc communication.

* PM-9449 - Create LockComponentService for facilitating client logic; potentially will decompose later.

* PM-9449 - Add extension lock comp service.

* PM-9449 - Libs/auth LockComp - bring in browser extension logic

* PM-9449 - Libs/auth LockComp html start

* PM-9449 - Libs/Auth LockComp - (1) Remove unused dep (2) Update setEmailAsPageSubtitle to work.

* PM-9449 - Add getBiometricsError to lock comp service for extension.

* PM-9449 - LockComp - (1) Save off client type as public comp var (2) Rename biometricLock as biometricLockSet

* PM-9449 - Work on lock comp service getAvailableUnlockOptions

* PM-9449 - WIP libs/auth LockComp

* PM-9449 - (1) Remove default lock comp svc (2) Add web lock comp svc.

* PM-9449 - UnlockOptions - replace incorrect type

* PM-9449 - DesktopLockComponentService -get most of observable based getAvailableUnlockOptions$ logic in place.

* PM-9449 - LockCompSvc - getAvailableUnlockOptions in place for all clients.

* PM-9449 - Add getBiometricsUnlockBtnText to LockCompSvc and put TODO for wiring it up later

* PM-9449 - Lock Comp - Replace all manual bools with unlock options.

* PM-9449 - Desktop Lock Comp Svc - adjust spacing

* PM-9449 - LockCompSvc - remove biometricsEnabled method

* PM-9449 - LockComp - Clean up commented out code

* PM-9449 - LockComp - webVaultHostname --> envHostName

* PM-9449 - Fix lock comp svc deps

* PM-9449 - LockComp - HTML progress

* PM-9449 - LockComp cleanup

* PM-9449 - Web Routing Module - wire up lock vs lockv2 using extension swap

* PM-9449 - Wire up loading state

* PM-9449 - LockComp - start wiring up listenForActiveUnlockOptionChanges logic with reactivity

* PM-9449 - Update desktop & extension lock comp service to use new biometrics service vs platform utils for biometrics information.

* PM-9449 - LockV2 - Swap platform util usage with toast svc

* PM-9449 - LockV2Comp - Bring over user id logic from PM-8933

* PM-9449 - LockV2Comp - Adjust everything to use activeAccount.id.

* PM-9449 - LockV2Comp - Progress on wiring up unlock option reactive stream.

* PM-9449 - LockComp ts - some refactoring and minor progress.

* PM-9449 - LockComp HTML - refactoring based on new idea to keep unlock options as separate as possible.

* PM-9449 - Add PIN translation to web

* PM-9449 - (1) Lock HTML refactor to make as independent verticals as possible (2) Refactor Lock ts (3) LockSvc - replace type with enum.

* PM-9449 - LockV2Comp - remove hardcoded await.

* PM-9449 - LockComp HTML - add todo

* PM-9449 - Web - Routing module - cleanup commented out stuff

* PM-9449 - LockV2Comp - Wire up biometrics + mild refactor.

* PM-9449 - Desktop - Wire up lockV2 redirection

* PM-9449 - LockV2 - Desktop - don't focus until unlock opts defined.

* PM-9449 - Fix accidental check in

* PM-9449 - LockV2 - loading state depends on unlock opts

* PM-9449 - LockV2 comp - remove unnecessary hr

* PM-9449 - Migrate  "yourVaultIsLockedV2" translation to desktop & browser.

* PM-9449 - LockV2 - Layout tweaks for biometrics

* PM-9449 - LockV2 - Biometric btn text

* PM-9449 - LockV2 - Wire up biometrics loading / disable state + remove unnecessary conditions around biometricsUnlockBtnText

* PM-9449 - DesktopLockSvc - Per discussion with Bernd, remove interval polling and just check once for biometric support and availability.

* PM-9449 - AuthGuard - Add todo to remove promptBiometric

* PM-9449 - LockV2 - Refactor primary and desktop init logic + misc clean up

* PM-9449 - LockV2 - Reorder init methods

* PM-9449 - LockV2 - Per discussion with Product, deprecate windows biometric settings update warning

* PM-9449 - Add TODO per discussion with Justin and remove TODO

* PM-9449 - LockV2 - Restore hide password on desktop window hidden functionality.

* PM-9449 - Clean up accomplished todo

* PM-9449 - LockV2 - Refactor func name.

* PM-9449 - LockV2 Comp - (1) TODO cleanup (2) Add browser logic to handleBiometricsUnlockEnabled

* PM-9449 - LockCompSvc changes - (1) Observability for isFido2Session (2) Adjust errors and returns per discussion with Justin

* PM-9449 - Per product, no longer need to support special fido2 case on extension.

* PM-9449 - LockCompSvc - add getPreviousUrl support

* PM-9449 - LockV2 - Continued ts cleanup

* PM-9449 - LockV2Comp - clean up unused props

* PM-9449 - LockV2Comp - Rename response to masterPasswordVerificationResponse

* PM-9449 - LockV2 - Remove unused formPromise prop

* PM-9449 - Add missing translations + update desktop to showReadonlyHostName

* PM-9449 - LockV2 - cleanup TODO

* PM-9449 - LockV2 - more cleanup

* PM-9449 - Desktop Routing Module - only allow LockV2 access if extension refresh flag is enabled.

* PM-9449 - Extension - AppRoutingModule - Add extension redirect + new lockV2 route.

* PM-9449 - Extension - AppRoutingModule - Add lockV2 to the ExtensionAnonLayoutWrapperComponent intead of the regular one.

* PM-9449 - Extension - CurrentAccountComp - add null checks as anon layout components don't have a state today. This prevents the account switcher from working on the new lockV2 comp.

* PM-9449 - Extension AppRoutingModule - LockV2 should use ExtensionAnonLayoutWrapperData

* PM-9449 - LockComp - BiometricUnlock - cancelling is a valid action.

* PM-9449 - LockV2 - Biometric autoprompt cleanup

* PM-9449 - LockV2 - (1) Add TODO for KM team (2) Fix submit logic.

* PM-9449 - Tweak TODO to add task #

* PM-9449 - Test WebLockComponentService

* PM-9449 - ExtensionLockComponentService tested

* PM-9449 - Tweak extension lock comp svc test

* PM-9449 - DesktopLockComponentService tested

* PM-9449 - Add task # to TODO

* PM-9449 - Update apps/browser/src/services/extension-lock-component.service.ts per PR feedback

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* PM-9449 - Per PR feedback, replace from with defer for better reactive execution of promise based functions.

* PM-9449 - Per PR feedback replace enum with type.

* PM-9449 - Fix imports and tests due to key management file moves.

* PM-9449 - Another test file import fix

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-10-01 16:06:18 -04:00
Bernd Schoolmann
dafe795854
Move asymmetric crypto functions out of crypto service (#10903) 2024-10-01 17:47:41 +02:00
Jared Snider
eb7eb614f5
PM-11962 - InputPasswordComp - add weak password checking (#11252) 2024-09-26 18:00:03 -04:00
Bernd Schoolmann
d92b2cbea2
[PM-11477] Remove deprecated cryptoservice functions (#10854)
* Remove deprecated cryptoservice functions

* Use getUserkeyWithLegacySupport to get userkey

* Fix tests

* Fix tests

* Fix tests

* Remove unused cryptoservice instances

* Fix build

* Remove unused apiService in constructor

* Fix encryption

* Ensure passed in key is used if present

* Fix sends and folders

* Fix tests

* Remove logged key

* Fix import for account restricted keys
2024-09-24 11:28:33 +02:00
Jared Snider
e1e772b0a2
PM-12365 - AnonLayoutWrapperComp - When you use the AnonLayoutWrapperDataService to set data in the AnonLayoutWrapperComponent, I’m seeing an ExpressionChangedAfterItHasBeenCheckedError shown in the console quite often. We should update the wrapper component to fire change detection if the AnonLayoutWrapperDataService receives new information. (#11136) 2024-09-19 13:39:16 -04:00
Justin Baur
1ebef296b9
[PM-12024] Move Lock All To Happen in Background (#11047)
* Move Lock All To Happen in Background

- Make it done serially
- Have the promise only resolve once it's complete

* Unlock Active Account Last

* Add Tests

* Update Comment
2024-09-16 16:08:03 -04:00
Bernd Schoolmann
15610906d2
[PM-7608] Account Security Settings V2 (#10441)
* Implement account security settings v2

* Increase await dialog delay to 500 msec

* Update messages

* Replace platformservice with biometricsservice

* Cleanup

* Cleanup

* Fix account security component according to feedback

* Re-add old message

* Re-add old error message

* Fix minimum timeout message

* Fix screen-reader on custom timeout

* Remove debugging configurations

* Fix incorrectly changed message

* Remove custom vault timeout text

* Restore vaultTimeoutPolicyInEffect i18n message in web

* Change text to use vaultTimeoutPolicyInEffect1

* Fix tests
2024-09-16 17:40:08 +02:00
rr-bw
96d116d643
[PM-8116] Auth Browser Refresh: Password Hint Component (#10492)
* setup component, services, and web HTML

* make Web and Browser functional

* make desktop functional

* update template to solidify common client HTML

* simplify template and class

* update browser routing

* move canActivate to correct location

* simplify post submit routing

* update routing to use unauthUiRefreshSwap()

* constrain AnonLayout title/subtitle width, reduce height on destkop to account for header

* reduce height on browser to account for header (otherwise have to scroll to see EnvSelector

* resolve email issue when clicking 'cancel' on extension popout

* update routing for web

* persist email to popout

* update web router and anon-layout min-h based on client

* change anchor link to button

* remove unnecessary formatting changes

* add new icon

* remove unnecessary call to loginEmailService
2024-09-13 09:16:25 -07:00
Jared Snider
bd3863c313
Auth/PM-11969 - Registration with Email Verification - Accept Emergency Access Invite Flow (#11018)
* PM-11969 - Registration with Email Verification - Accept Emergency Access Invite Fixed

* PM-11969 - Fix PR feedback

* PM-11969 - AcceptEmergencyComponent - remove prop
2024-09-12 20:14:37 -04:00
Jared Snider
b6cde7e3ef
Auth/PM-11945 - Registration with Email Verification - Fix Org Sponsored Free Family Plan not working (#11012)
* PM-11945 - AcceptOrg - fix inaccurate comment.

* PM-11945 - Refactor new registration process to pass along orgSponsoredFreeFamilyPlanToken

* PM-11945 - RegistrationFinishComponent - wire up passing of orgSponsoredFreeFamilyPlanToken to submit method

* PM-11945 - Add todo
2024-09-12 15:24:35 -04:00
Victoria League
a0a0a7ae13
[CL-395] Add and use art colors in svgs (#10990) 2024-09-11 14:54:07 -04:00
rr-bw
12967b0c17
h3 typography on small screens, h2 on medium-large screens (#10939) 2024-09-09 15:12:31 -07:00
Nick Krantz
4e7399ed98
[PM-9733] Custom Vault Timeout (#10515)
* handle timeout changes that are predefined string values

- Passing a string to `Math.max` will cause a NaN to be set.

* type form instance so TypeScript is more aware of the form values
2024-09-09 16:36:23 -05:00
Thomas Rittson
8344623185
[PM-11450] Move organization-user domain to admin-console lib (#10785)
- move organization-user files from libs/common/src/admin-console into libs/admin-console/src/common
- add barrel files and update imports to use barrel files
- rename OrganizationUserService to OrganizationUserApiService
- rename OrganizationUserServiceImplementation to DefaultOrganizationUserApiService
2024-09-04 18:21:26 -04:00
Todd Martin
86fab07a37
Auth/PM-5099 Ensure consistent casing of email used for fingerprint generation in Auth Requests (#8571)
* Created method for handilng email-address-based fingerprint.

* Added test for new method.

* Added returns to annotation
2024-09-04 10:22:06 -04:00
rr-bw
b27dc44298
[PM-11136] Convert LoginEmailService email property to state provider (#10624)
* convert email property to state provider

* update tests

* assign loginEmail to variable before passing in

* remove nav logic in ngOnInit
2024-09-03 09:40:11 -07:00
rr-bw
b339c01c20
remove position on browser (#10810) 2024-08-31 13:19:48 -07:00
rr-bw
c5a267baad
[PM-11000] AnonLayout Icon/Logo theme refactor (#10549)
* update base anon-layout logo/icon

* update ExtensionAnonLayout logo/icon based on theme

* remove hard-coded fill

* remove solarizedDark class

---------

Co-authored-by: Bernd Schoolmann <mail@quexten.com>
2024-08-31 12:26:11 -07:00
Jared Snider
0a0cbde5b3
Auth/PM-11318 - Registration With Email Verification - Login After Registration (#10783)
* PM-11318 - Registration Finish - Log user in after registration

* PM-11318 - Adjust registration and login message to be one msg

* PM-11318 - RegistrationFinish - Adjust messaging based on product feedback.

* PM-11318 - RegistrationFinishComp - Tweak redirect and error logic.
2024-08-29 13:55:09 -04:00
Jordan Aasen
9041a4cd4c
[PM-6564] migrate auth toasts to CL toastService (#10665)
* migrate auth toasts to CL toastService

* fix component args

* fix component args

* fix specs

* fix toastService args
2024-08-27 10:33:58 -07:00
Matt Gibson
9459cda304
Pm-10953/add-user-context-to-sync-replaces (#10627)
* Require userId for setting masterKeyEncryptedUserKey

* Replace folders for specified user

* Require userId for collection replace

* Cipher Replace requires userId

* Require UserId to update equivalent domains

* Require userId for policy replace

* sync state updates between fake state for better testing

* Revert to public observable tests

Since they now sync, we can test single-user updates impacting active user observables

* Do not init fake states through sync

Do not sync initial null values, that might wipe out already existing data.

* Require userId for Send replace

* Include userId for organization replace

* Require userId for billing sync data

* Require user Id for key connector sync data

* Allow decode of token by userId

* Require userId for synced key connector updates

* Add userId to policy setting during organization invite accept

* Fix cli

* Handle null userId

---------

Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
2024-08-26 20:44:08 -04:00
Oscar Hinton
9152c3203f
[BEEEP] [PM-10117] Migrate index.html (#10286)
Migrate the index.html to use tailwind instead of bootstrap

* Extracted some more global styles to override the bootstrap styles for layout
  frontend. We should revisit this when we remove bootstrap.
* Removed Angular specific logo for anon pages. Now uses the same css class as
  loading page to prevent duplicated assets.
2024-08-26 18:15:09 +02:00
Victoria League
ed719f835a
[CL-389] Add end slot to non-text bit label content (#10457) 2024-08-20 11:55:11 -04:00
Will Martin
7571c766e0
[PM-10813] add eslint rule to restrict imports from apps in libs (#10481)
* restrict app imports in libs

* add eslint ignore comments
2024-08-14 11:24:29 -07:00
Jared Snider
a13e99ebe9
Auth/PM-10601 - Tech Debt Cleanup - Refactor Lock Component and User Verification to use PinService (#10408)
* PM-10601 - PinSvc new unlock check first draft

* PM-10601 - PinSvc - add new method for determining if pin decryption is available.

* PM-10601 - Add more docs on PinSvc

* PM-10601 - Update Lock Comp & User Verification service + tests to use new isPinDecryptionAvailable method
2024-08-13 15:19:13 -04:00
Nick Krantz
a6176aaf2c
[PM-10799] Login UI Width (#10506)
* reset `maxWidth` attribute during page change

* set default value for `maxWidth` if null or undefined is passed

* implement `maxWidth` for extension implementation of Anon Layout
2024-08-13 14:18:04 -05:00
Todd Martin
7b508b1ad7
[PM-8933] Require userId on setUserKey (#9675)
* Updated all sets of user key to pass in userId

* Added userId on auth request login.

* Fixed tests.

* Fixed tests to pass in UserId

* Added parameter to tests.

* Addressed PR feedback.

* Merged main
2024-08-13 08:07:36 -04:00
Jared Snider
46ecde5d63
PM-9603 - AnonLayout Dynamic Content Support - Add ability to avoid translating subtitle as we have designs where a user's email needs to go in the subtitle slot. (#10459) 2024-08-09 10:09:40 -04:00
rr-bw
b2a995462f
[PM-9605] Extension AnonLayout wrapper component (#10338)
* setup extension component

* setup extension service

* update icon based on theme, adjust padding, service injection

* override service

* add stories

* add current-account component

* add ConfigService to storybook

* use null checks for boolean data - otherwise false values are ignored

* update translations

* remove router implementation test

* remove imports in main.background.ts

* add showLogo to template

* update icon usage

* fix app-current-account storybook style issue
2024-08-06 16:02:47 -07:00
Jake Fink
2819ac597f
[BEEEP: PM-10190] Use strict TS checks in CLI service container (#10298)
* move cli service-container to new folder

* fix imports

* add tsconfig and fix type issues in other services

* fix more imports in service-container

* make ts server happy in service-container

* fix actual bugs in cli service-container

* fix package json reference path

* fix service-container import

* update type on cipher service
2024-08-05 11:39:08 -04:00
Bernd Schoolmann
c6229abd12
[PM-5963] Fix tde offboarding vault corruption (#9480)
* Fix tde offboarding

* Add tde offboarding password request

* Add event for tde offboarding

* Update libs/auth/src/common/models/domain/user-decryption-options.ts

Co-authored-by: Jake Fink <jfink@bitwarden.com>

* Update libs/common/src/services/api.service.ts

Co-authored-by: Jake Fink <jfink@bitwarden.com>

* Make tde offboarding take priority

* Update tde offboarding message

* Fix unit tests

* Fix unit tests

* Fix typo

* Fix unit tests

---------

Co-authored-by: Jake Fink <jfink@bitwarden.com>
2024-08-01 19:48:09 -04:00
rr-bw
27fa7625cf
add option to make button block/inline (#10197) 2024-07-30 21:27:00 -05:00
rr-bw
18ef51449f
[PM-8307] AnonLayout Design Changes (#10166)
* update logo, padding, and add hideFooter property and hideLogo input

* typography and icon adjustments

* add story with hidden logo input

* handle updating the icon

* update storybook docs

* update border radius

* update icon colors to use tw classes

* update storybook docs

* handle default icon

* make hideFooter an input

* update icon sizing

* update icon sizing
2024-07-30 13:48:51 -05:00
Nick Krantz
8f437dc773
[PM-1655] Trial Registration Layout (#9091)
* add messaging for finish sign up component

* Add product enum for finish sign up components

* Allow confirmation details component to display secret manager confirmation

* add FinishSignUp component

- Started as exact copy of trial initiation component
- Consolidated with secrets manager trial components

* Integration finish sign up component into routing

- Use anon layout component
- Add resolver to pass the accurate title to the layout

* migrate to product tier type

* use existing ProductType enum

* migrate to accept org service

* fix query param parsing for free trial text

* migrate finish sign up to complete trial naming

* migrate fully to productTier

* fix import of free trial resolver

* increase max width of anon layout

* add auth-input component

* refactor component makeup

* export the users password if needed to auto login the user

* handle login situations where a stepper isn't used

* fix type check

* allow max width of anon layout to be configurable

* remove account created toast

* update productTier query param in text resolver

* set maxWidth for secrets manager trial route

* parse product query param as an int

* properly show registration error

* update routes to be from the root rather than relative

* install updated prettier and apply fixes

* fix missing password in test

---------

Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2024-07-30 08:11:40 -04:00
Jared Snider
96648b4897
Auth/PM-9603 - AnonLayoutWrapper Dynamic content support (#10216)
* PM-9603 - WIP - Untested DefaultAnonLayoutWrapperDataService

* PM-9603 - DefaultAnonLayoutWrapperSvc needs constructor

* PM-9603 - Good progress on getting storybook setup for the anon-layout-wrapper component - having issues with getting dummy component to display.

* PM-9603 - AnonLayoutWrapper Story working with default and dynamic content.

* PM-9603 - Tweak verbiage

* PM-9603 - Tweak stories; add mdx

* PM-9603 - Export AnonLayoutWrapperDataService and DefaultAnonLayoutWrapperDataService from libs/auth and wire up as default implementation in jslib-services.module

* PM-9603 - Address PR feedback
2024-07-25 16:16:54 -04:00
Jared Snider
c755512770
Auth/PM-10095 - Registration with Email Verification - Registration Finish - Fix endless load on Org Invite Accept (#10270)
* PM-10095 - Properly center loading spinner

* PM-10095 - RegistrationFinish - update query param changes subscription to have empty observable path for org invite to prevent observable error of switchmap receiving undefined.
2024-07-25 11:41:02 -04:00