From ce84125473806ac69ab14d616c7ee590bb314e00 Mon Sep 17 00:00:00 2001 From: rr-bw <102181210+rr-bw@users.noreply.github.com> Date: Mon, 22 Sep 2025 10:13:29 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"feat(sso-config):=20Auth/[PM-18470]?= =?UTF-8?q?=20Pre-populate=20Key=20Connector=20URL=20(#16=E2=80=A6"=20(#16?= =?UTF-8?q?534)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit debe7b1f19fcbb9c79fe28ba1c9d9c2b35390e03. --- .../bit-web/src/app/auth/sso/sso.component.ts | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts b/bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts index d881c7c3dbf..9baeaabb33f 100644 --- a/bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts +++ b/bitwarden_license/bit-web/src/app/auth/sso/sso.component.ts @@ -9,7 +9,7 @@ import { Validators, } from "@angular/forms"; import { ActivatedRoute } from "@angular/router"; -import { concatMap, firstValueFrom, Subject, switchMap, takeUntil } from "rxjs"; +import { concatMap, firstValueFrom, Subject, takeUntil } from "rxjs"; import { ControlsOf } from "@bitwarden/angular/types/controls-of"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; @@ -34,7 +34,6 @@ import { OrganizationSsoRequest } from "@bitwarden/common/auth/models/request/or import { OrganizationSsoResponse } from "@bitwarden/common/auth/models/response/organization-sso.response"; import { SsoConfigView } from "@bitwarden/common/auth/models/view/sso-config.view"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; -import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; @@ -202,7 +201,6 @@ export class SsoComponent implements OnInit, OnDestroy { private accountService: AccountService, private organizationApiService: OrganizationApiServiceAbstraction, private toastService: ToastService, - private environmentService: EnvironmentService, ) {} async ngOnInit() { @@ -253,32 +251,6 @@ export class SsoComponent implements OnInit, OnDestroy { .subscribe(); this.showKeyConnectorOptions = this.platformUtilsService.isSelfHost(); - - // Only setup listener if key connector is a possible selection - if (this.showKeyConnectorOptions) { - this.listenForKeyConnectorSelection(); - } - } - - listenForKeyConnectorSelection() { - this.ssoConfigForm?.controls?.memberDecryptionType.valueChanges - .pipe( - switchMap(async (memberDecryptionType) => { - if (memberDecryptionType === MemberDecryptionType.KeyConnector) { - // Pre-populate a default key connector URL (user can still change it) - const env = await firstValueFrom(this.environmentService.environment$); - const webVaultUrl = env.getWebVaultUrl(); - const defaultKeyConnectorUrl = webVaultUrl + "/key-connector/"; - - this.ssoConfigForm.controls.keyConnectorUrl.setValue(defaultKeyConnectorUrl); - } else { - // Otherwise clear the key connector URL - this.ssoConfigForm.controls.keyConnectorUrl.setValue(""); - } - }), - takeUntil(this.destroy$), - ) - .subscribe(); } ngOnDestroy(): void {