1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[PM-3343] Capture TOTP QR codes from websites in the browser extension (#5985)

* Implement totp capture for browser extensions
This commit is contained in:
Bernd Schoolmann
2024-01-03 19:20:17 +01:00
committed by GitHub
parent 364e23d8a5
commit 1b4717a78f
13 changed files with 136 additions and 14 deletions

View File

@@ -49,6 +49,7 @@ export class EmergencyAddEditCipherComponent extends BaseAddEditComponent {
logService: LogService,
sendApiService: SendApiService,
dialogService: DialogService,
window: Window,
datePipe: DatePipe,
) {
super(
@@ -69,6 +70,7 @@ export class EmergencyAddEditCipherComponent extends BaseAddEditComponent {
passwordRepromptService,
sendApiService,
dialogService,
window,
datePipe,
);
}

View File

@@ -61,6 +61,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
passwordRepromptService: PasswordRepromptService,
sendApiService: SendApiService,
dialogService: DialogService,
window: Window,
datePipe: DatePipe,
) {
super(
@@ -79,6 +80,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
organizationService,
sendApiService,
dialogService,
window,
datePipe,
);
}
@@ -142,9 +144,9 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
this.platformUtilsService.launchUri(uri.launchUri);
}
copy(value: string, typeI18nKey: string, aType: string) {
async copy(value: string, typeI18nKey: string, aType: string): Promise<boolean> {
if (value == null) {
return;
return false;
}
this.platformUtilsService.copyToClipboard(value, { window: window });
@@ -166,6 +168,8 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
);
}
}
return true;
}
async generatePassword(): Promise<boolean> {

View File

@@ -51,6 +51,7 @@ export class AddEditComponent extends BaseAddEditComponent {
organizationService: OrganizationService,
sendApiService: SendApiService,
dialogService: DialogService,
window: Window,
datePipe: DatePipe,
) {
super(
@@ -71,6 +72,7 @@ export class AddEditComponent extends BaseAddEditComponent {
passwordRepromptService,
sendApiService,
dialogService,
window,
datePipe,
);
}