|
|
|
|
@ -122,20 +122,6 @@ export class Fido2Component implements OnInit, OnDestroy {
@@ -122,20 +122,6 @@ export class Fido2Component implements OnInit, OnDestroy {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Show dialog if user account does not have master password
|
|
|
|
|
if (!(await this.passwordRepromptService.enabled())) { |
|
|
|
|
await this.dialogService.openSimpleDialog({ |
|
|
|
|
title: { key: "featureNotSupported" }, |
|
|
|
|
content: { key: "passkeyFeatureIsNotImplementedForAccountsWithoutMasterPassword" }, |
|
|
|
|
acceptButtonText: { key: "ok" }, |
|
|
|
|
cancelButtonText: null, |
|
|
|
|
type: "info", |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.abort(true); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return message; |
|
|
|
|
}), |
|
|
|
|
filter((message) => !!message), |
|
|
|
|
@ -261,20 +247,14 @@ export class Fido2Component implements OnInit, OnDestroy {
@@ -261,20 +247,14 @@ export class Fido2Component implements OnInit, OnDestroy {
|
|
|
|
|
protected async saveNewLogin() { |
|
|
|
|
const data = this.message$.value; |
|
|
|
|
if (data?.type === "ConfirmNewCredentialRequest") { |
|
|
|
|
let userVerified = false; |
|
|
|
|
if (data.userVerification) { |
|
|
|
|
userVerified = await this.passwordRepromptService.showPasswordPrompt(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!data.userVerification || userVerified) { |
|
|
|
|
await this.createNewCipher(); |
|
|
|
|
} |
|
|
|
|
await this.createNewCipher(); |
|
|
|
|
|
|
|
|
|
// We are bypassing user verification pending implementation of PIN and biometric support.
|
|
|
|
|
this.send({ |
|
|
|
|
sessionId: this.sessionId, |
|
|
|
|
cipherId: this.cipher?.id, |
|
|
|
|
type: "ConfirmNewCredentialResponse", |
|
|
|
|
userVerified, |
|
|
|
|
userVerified: data.userVerification, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -386,17 +366,17 @@ export class Fido2Component implements OnInit, OnDestroy {
@@ -386,17 +366,17 @@ export class Fido2Component implements OnInit, OnDestroy {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private async handleUserVerification( |
|
|
|
|
userVerification: boolean, |
|
|
|
|
userVerificationRequested: boolean, |
|
|
|
|
cipher: CipherView |
|
|
|
|
): Promise<boolean> { |
|
|
|
|
const masterPasswordRepromptRequiered = cipher && cipher.reprompt !== 0; |
|
|
|
|
const verificationRequired = userVerification || masterPasswordRepromptRequiered; |
|
|
|
|
const masterPasswordRepromptRequired = cipher && cipher.reprompt !== 0; |
|
|
|
|
|
|
|
|
|
if (!verificationRequired) { |
|
|
|
|
return false; |
|
|
|
|
if (masterPasswordRepromptRequired) { |
|
|
|
|
return await this.passwordRepromptService.showPasswordPrompt(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return await this.passwordRepromptService.showPasswordPrompt(); |
|
|
|
|
// We are bypassing user verification pending implementation of PIN and biometric support.
|
|
|
|
|
return userVerificationRequested; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private send(msg: BrowserFido2Message) { |
|
|
|
|
|