mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
cb028eadb5fb17263a4a1c0c0ffda6b23caeb0b5
11 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
077e0f89cc |
[PM-17751] Store SSO email in state on web client (#13295)
* Moved saving of SSO email outside of browser/desktop code * Clarified comments. * Tests * Refactored login component services to manage state * Fixed input on login component * Fixed tests * Linting * Moved web setting in state into web override * updated tests * Fixed typing. * Fixed type safety issues. * Added comments and renamed for clarity. * Removed method parameters that weren't used * Added clarifying comments * Added more comments. * Removed test that is not necessary on base * Test cleanup * More comments. * Linting * Fixed test. * Fixed base URL * Fixed typechecking. * Type checking * Moved setting of email state to default service * Added comments. * Consolidated SSO URL formatting * Updated comment * Fixed reference. * Fixed missing parameter. * Initialized service. * Added comments * Added initialization of new service * Made email optional due to CLI. * Fixed comment on handleSsoClick. * Added SSO email persistence to v1 component. --------- Co-authored-by: Bernd Schoolmann <mail@quexten.com> |
||
|
|
62e879940c |
[deps] SM: Update typescript-eslint monorepo to v8 (major) (#10601)
* [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> |
||
|
|
9c1e2ebd67 |
Typescript-strict-plugin (#12235)
* 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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
25711afaf6 |
[PM-5976] Safari Browser SSO Initialization Race Condition Attempted Fix 3 (#7800)
* [PM-5976] Safari Browser SSO Initialization Race Condition Attempted Fix 3 * [PM-5976] Safari Browser SSO Initialization Race Condition Attempted Fix 3 * [PM-5976] Removing usage of pinging system and keeping reworked top-level registration of window message listener events * [PM-5976] Pulling the implementation of the static content script delcaration for the content-message-handler file to the top of the list of content_scripts * [PM-5976] Pulling the implementation of the static content script delcaration for the content-message-handler file to the top of the list of content_scripts * [PM-5976] Removing the useCapture value within the window message event listener |
||
|
|
d047723f04 |
Auth & Autofill / PM-5976 - Safari Browser SSO Initialization Race Condition Attempted Fix 2 (#7794)
* Implementing pinging system for SSO to address issue on Safari with race condition * Implementing pinging system for SSO to address issue on Safari with race condition * [PM-5976] Updating references within sso.ts --------- Co-authored-by: Cesar Gonzalez <cgonzalez@bitwarden.com> |
||
|
|
6e96964c1a |
Auth/PM-5976 - Safari Browser SSO Initialization Race Condition Attempted Fix (#7793)
* PM-5976 - Only try to initiate browser SSO when document is ready to avoid race condition between browser content script message listener being registered and the browser sso initiating message being sent. * PM-5976 - adjust initiateBrowserSsoIfDocumentReady per PR feedback |
||
|
|
b98af7f05d | Listen to Window Load (#7506) | ||
|
|
afc9128653 |
[PM-4419] Add lastpass direct importer to browser (#6638)
* 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 * Enable importing on deskop Create import-dialog Create file-menu entry to open import-dialog Extend messages.json to include all the necessary messages from shared components * Renamed filenames according to export rename * Make ImportWebComponent standalone, simplify routing * Pass organizationId as Input to ImportComponent * use formLoading and formDisabled outputs * use formLoading & formDisabled in desktop * 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 * Enable importing on deskop Create import-dialog Create file-menu entry to open import-dialog Extend messages.json to include all the necessary messages from shared components * use formLoading & formDisabled in desktop * Add missing message for importBlockedByPolicy callout * Remove commented code for submit button * Implement onSuccessfulImport to close dialog on success * fix table themes on desktop & browser * fix fileSelector button styles * update selectors to use tools prefix; remove unused selectors * update 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 * import-lastpass wip * Lazy-load the ImportWebComponent via both routes * Fix import path for ImportComponent * add validation; add shared folders field * clean up logic * fill fileContent on account change * Use SharedModule as import in import-web.component * show spinner on pending validation; properly debounce; refactor to loadCSVData func * fix pending submit guard * hide on web, show on desktop & browser * reset user agent fieldset styles * fix validation * File selector should be displayed as secondary * update validation * Fix setUserTypeContext always throwing * refactor to password dialog approach * remove control on destroy; dont submit on enter keydown * helper to serialize vault accounts (#6556) * helper to serialize vault accounts * prettier * add prompts * Add missing messages for file-password-prompt * Add missing messages for import-error-dialog * Add missing message for import-success-dialog * Create client-info * Separate submit and handling import, add error-handling * Move catch and error handling into submit * Remove AsyncValidator logic from handleImport * Add support for filtering shared accounts * add sso flow to lp import (#6574) * stub out some sso flow * use computer props * lastpass callback * baseOpenIDConnectAuthority * openIDConnectAuthorityBase * comments * camelCase user type context model * processSigninResponse * Refactor handleImport * use large dialogSize * remove extra setUserTypeContext * fix passwordGenerationService provider; pass all errors to ValidationErrors * add await SSO dialog & logic * Move lastpass related files into separate folder * Use bitSubmit to override submit preventDefault (#6607) Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> * Use large dialogSize * revert jslib changes * PM-4398 - Add missing importWarning * make ui class methods async * add LastPassDirectImportService * update error handling * add OOB methods (manual passcode only) * fix typo * respond to SSO callback * localize error messages * remove uneeded comment * update i18n * add await sso i18n * add not implemented error to service * fix getting k2 * fix k1 bugs * null checks should not be strict * update awaiting sso dialog * update approveDuoWebSdk * add browser lastpass oidc/sso connector * add getRedirectUrlWithParams * params * rename to getOidcRedirectUrlWithParams * refactor oob login flow * Add messages needed for Lastpass import flow Taken from https://github.com/bitwarden/clients/pull/6541/files#diff-47e9af6d0d7d691a507534f7955edaa9fb37be8cf1c1981fd2ba898e99b6130d * Update apps/browser/src/connectors/sso.ts Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com> * Update libs/importer/src/components/lastpass/import-lastpass.component.ts Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com> * fix error * Removing fieldset due to merge of https://github.com/bitwarden/clients/pull/6626 * Add sso-connector to manifest.v3 * Make linter happy * Refactoring to push logic into the service vs the component Move all methods related to MFA-UI into a LastPassDirectImportUIService Move all logic around the import into a LastPassDirectImportService The component now only has the necessary flows but no knowledge on how to use the lastpass import lib or the need for a OIDC client * Remove unneeded passwordGenerationService * move all import logic to service * apply code review: remove name attributes; use protected fields; use formGroup.value * rename submit method and add comment * update textarea id * update i18n * remove rogue todo comment * Add missing messages forLastpass import * extract helper asyncValidatorsFinished * Remove files related to DuoUI we didn't need to differentiate for MFA via Duo * Add missing import * use clientType * triple = * lastpassAuthResult for web sso connector * remove browser sso connector * use web vault for oidc redirect url * revert formGroup.value access * process lastpassAuthResult * simplify message handler logic * consolidate logic for lastpass auth result * swap lastpass logic in sso connector * add email to signInRequest * add try again error message * add try again i18n * consistent clientinfo id (#6654) --------- Co-authored-by: William Martin <contact@willmartian.com> * hide on browser * show LP importer on browser client * add missing i18n to browser * add lastpass prefix * add shared i18n copy to web and browser * rename deeplink * use protected field * rename el ids * refactor: remove nested conditional * update form ids in consuming client components * remove unnecessary return statement * fix file id * use ngIf * use hidden because of getElementById * Remove OIDC lib logging * Forward LP sso callback message to LP direct import service * Add missing collection label * Add missing `invalidFilePassword` to messages.json --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Co-authored-by: William Martin <contact@willmartian.com> Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com> |
||
|
|
02fe715903 | Move web to apps/web and bitwarden_license/bit-web |