mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 05:30:01 +00:00
Followup to fix merge issues and other comments
This commit is contained in:
@@ -97,7 +97,7 @@ export class Fido2PlaceholderComponent implements OnInit, OnDestroy {
|
||||
// userVerification: true,
|
||||
// });
|
||||
|
||||
this.session.notifyConfirmCredential(true);
|
||||
this.session.notifyConfirmCreateCredential(true);
|
||||
|
||||
// Not sure this clean up should happen here or in session.
|
||||
// The session currently toggles modal on and send us here
|
||||
@@ -113,7 +113,7 @@ export class Fido2PlaceholderComponent implements OnInit, OnDestroy {
|
||||
await this.router.navigate(["/"]);
|
||||
await this.desktopSettingsService.setModalMode(false);
|
||||
|
||||
this.session.notifyConfirmCredential(false);
|
||||
this.session.notifyConfirmCreateCredential(false);
|
||||
// little bit hacky:
|
||||
this.session.confirmChosenCipher(null);
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
/**
|
||||
* Notifies the Fido2UserInterfaceSession that the UI operations has completed and it can return to the OS.
|
||||
*/
|
||||
notifyConfirmCredential(confirmed: boolean, updatedCipher?: CipherView): void {
|
||||
notifyConfirmCreateCredential(confirmed: boolean, updatedCipher?: CipherView): void {
|
||||
if (updatedCipher) {
|
||||
this.updatedCipher = updatedCipher;
|
||||
}
|
||||
@@ -229,7 +229,7 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
// Wait for the UI to wrap up
|
||||
const confirmation = await this.waitForUiNewCredentialConfirmation();
|
||||
if (!confirmation) {
|
||||
throw new Error("User cancelled");
|
||||
return { cipherId: undefined, userVerified: false };
|
||||
}
|
||||
|
||||
if (this.updatedCipher) {
|
||||
|
||||
@@ -94,7 +94,7 @@ export class Fido2CreateComponent implements OnInit {
|
||||
}
|
||||
|
||||
async addPasskeyToCipher(cipher: CipherView) {
|
||||
this.session.notifyConfirmCredential(true, cipher);
|
||||
this.session.notifyConfirmCreateCredential(true, cipher);
|
||||
}
|
||||
|
||||
async confirmPasskey() {
|
||||
@@ -105,16 +105,7 @@ export class Fido2CreateComponent implements OnInit {
|
||||
throw new Error("No session found");
|
||||
}
|
||||
|
||||
// If we want to we could submit information to the session in order to create the credential
|
||||
// const cipher = await session.createCredential({
|
||||
// userHandle: "userHandle2",
|
||||
// userName: "username2",
|
||||
// credentialName: "zxsd2",
|
||||
// rpId: "webauthn.io",
|
||||
// userVerification: true,
|
||||
// });
|
||||
|
||||
this.session.notifyConfirmCredential(true);
|
||||
this.session.notifyConfirmCreateCredential(true);
|
||||
|
||||
// Not sure this clean up should happen here or in session.
|
||||
// The session currently toggles modal on and send us here
|
||||
@@ -129,7 +120,7 @@ export class Fido2CreateComponent implements OnInit {
|
||||
async closeModal() {
|
||||
await this.router.navigate(["/"]);
|
||||
await this.desktopSettingsService.setModalMode(false);
|
||||
this.session.notifyConfirmCredential(false);
|
||||
this.session.notifyConfirmCreateCredential(false);
|
||||
this.session.confirmChosenCipher(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ export class Fido2VaultComponent implements OnInit, OnDestroy {
|
||||
await this.router.navigate(["/"]);
|
||||
await this.desktopSettingsService.setModalMode(false);
|
||||
|
||||
this.session.notifyConfirmCredential(false);
|
||||
this.session.notifyConfirmCreateCredential(false);
|
||||
this.session.confirmChosenCipher(null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user