From 30709a7eb59fbb6321444ffbaf732266e5979eab Mon Sep 17 00:00:00 2001 From: Katherine Reynolds <7054971+reynoldskr@users.noreply.github.com> Date: Wed, 26 Nov 2025 09:55:28 -0800 Subject: [PATCH] Minor updates pt 1 --- apps/browser/src/_locales/en/messages.json | 3 +++ .../popup/settings/tunnel-demo.component.ts | 21 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index a2974c0fe04..4dcaca52125 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -3786,6 +3786,9 @@ "triggerTunnelDemo": { "message": "Run tunnel demo test ⚠️" }, + "verifyIdentityToSendCredentials": { + "message": "Send credential over tunnel?" + }, "accessAttemptBy": { "message": "Access attempt by $EMAIL$", "placeholders": { diff --git a/apps/browser/src/tools/popup/settings/tunnel-demo.component.ts b/apps/browser/src/tools/popup/settings/tunnel-demo.component.ts index 98b8eb53f80..81414ecd832 100644 --- a/apps/browser/src/tools/popup/settings/tunnel-demo.component.ts +++ b/apps/browser/src/tools/popup/settings/tunnel-demo.component.ts @@ -4,7 +4,7 @@ import { FormBuilder, ReactiveFormsModule, Validators } from "@angular/forms"; import { firstValueFrom, Subject, takeUntil } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; -import { UserVerificationDialogComponent } from "@bitwarden/auth/angular"; +// import { UserVerificationDialogComponent } from "@bitwarden/auth/angular"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; @@ -305,9 +305,25 @@ export class TunnelDemoComponent implements OnInit, OnDestroy { const { domain, remoteUsername, respond } = this.pendingCredentialRequest; + // Simple yes/no dialog for credential approval + const approved = await this.dialogService.openSimpleDialog({ + title: "Credential Request", + content: `${remoteUsername} is requesting credentials for the domain ${domain}. Do you want to approve this request?`, + type: "warning", + acceptButtonText: { key: "yes" }, + cancelButtonText: { key: "no" }, + }); + + if (!approved) { + respond(false); + this.pendingCredentialRequest = undefined; + return; + } + + /* OLD CODE - User verification with UserVerificationDialogComponent // Verify user identity before sending credentials const verificationResult = await UserVerificationDialogComponent.open(this.dialogService, { - verificationType: "client", + //verificationType: "client", title: "verificationRequired", bodyText: "verifyIdentityToSendCredentials", calloutOptions: { @@ -322,6 +338,7 @@ export class TunnelDemoComponent implements OnInit, OnDestroy { this.pendingCredentialRequest = undefined; return; } + */ // Look up credential from vault const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));