mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
[PM-4580] Removed user verification requirement (#6711)
* Revert the undefined UV check. * Adjusted formatting * Remove restriction on passkeys for users without MPs. * Removed user verification checks
This commit is contained in:
parent
8d2a1a89b7
commit
3e62559f44
@ -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 {
|
||||
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();
|
||||
}
|
||||
|
||||
// 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 {
|
||||
}
|
||||
|
||||
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) {
|
||||
|
@ -365,6 +365,7 @@ function mapToMakeCredentialParams({
|
||||
|
||||
const requireUserVerification =
|
||||
params.authenticatorSelection?.userVerification === "required" ||
|
||||
params.authenticatorSelection?.userVerification === "preferred" ||
|
||||
params.authenticatorSelection?.userVerification === undefined;
|
||||
|
||||
return {
|
||||
@ -403,7 +404,9 @@ function mapToGetAssertionParams({
|
||||
}));
|
||||
|
||||
const requireUserVerification =
|
||||
params.userVerification === "required" || params.userVerification === undefined;
|
||||
params.userVerification === "required" ||
|
||||
params.userVerification === "preferred" ||
|
||||
params.userVerification === undefined;
|
||||
|
||||
return {
|
||||
rpId: params.rpId,
|
||||
|
Loading…
Reference in New Issue
Block a user