mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[PM-11419] Fix issues encountered with inline menu passkeys (#10892)
* [PM-11419] Login items do not display after adding passkey * [PM-11419] Login items do not display after adding passkey * [PM-11419] Incorporating fixes for deleting a cipher from the inline menu as well as authenticating using passkeys * [PM-11419] Fixing an issue where master password reprompt is ignored for a set passkey cipher * [PM-11419] Fixing an issue where saving a passkey does not trigger a clearing of cached cipher values * [PM-11419] Refactoring implementation * [PM-11419] Ensuring that passkeys must be enabled in order for ciphers to appear * [PM-11419] Adding an abort event from the active request manager * [PM-11419] Adding an abort event from the active request manager * [PM-11419] Working through jest tests within implementation * [PM-11419] Fixing jest tests within Fido2ClientService and Fido2AuthenticatorService * [PM-11419] Adding jest tests for added logic within OverlayBackground * [PM-11419] Adding jest tests for added logic within OverlayBackground * [PM-11419] Reworking how we handle assuming user presence when master password reprompt is required * [PM-11419] Reworking how we handle assuming user presence when master password reprompt is required * [PM-11419] Reworking how we handle assuming user presence when master password reprompt is required * [PM-11419] Refactoring implementation * [PM-11419] Incorporating suggestion for reporting failed passkey authentication from the inline menu * [PM-11419] Reworking positioning of the abort controller that informs the background script of an error * [PM-11419] Scoping down the behavior surrounding master password reprompt a bit more tightly * [PM-11419] Reworking how we handle reacting to active fido2 requests to avoid ambiguity * [PM-11419] Reworking how we handle reacting to active fido2 requests to avoid ambiguity * [PM-11419] Adjusting implementation to ensure we clear any active requests when the passkeys setting is modified
This commit is contained in:
@@ -2,9 +2,22 @@ import { Observable, Subject } from "rxjs";
|
||||
|
||||
import { Fido2CredentialView } from "../../../vault/models/view/fido2-credential.view";
|
||||
|
||||
export const Fido2ActiveRequestEvents = {
|
||||
Refresh: "refresh-fido2-active-request",
|
||||
Abort: "abort-fido2-active-request",
|
||||
Continue: "continue-fido2-active-request",
|
||||
} as const;
|
||||
|
||||
type Fido2ActiveRequestEvent = typeof Fido2ActiveRequestEvents;
|
||||
|
||||
export type RequestResult =
|
||||
| { type: Fido2ActiveRequestEvent["Refresh"] }
|
||||
| { type: Fido2ActiveRequestEvent["Abort"] }
|
||||
| { type: Fido2ActiveRequestEvent["Continue"]; credentialId: string };
|
||||
|
||||
export interface ActiveRequest {
|
||||
credentials: Fido2CredentialView[];
|
||||
subject: Subject<string>;
|
||||
subject: Subject<RequestResult>;
|
||||
}
|
||||
|
||||
export type RequestCollection = Readonly<{ [tabId: number]: ActiveRequest }>;
|
||||
@@ -16,6 +29,7 @@ export abstract class Fido2ActiveRequestManager {
|
||||
tabId: number,
|
||||
credentials: Fido2CredentialView[],
|
||||
abortController: AbortController,
|
||||
) => Promise<string>;
|
||||
) => Promise<RequestResult>;
|
||||
removeActiveRequest: (tabId: number) => void;
|
||||
removeAllActiveRequests: () => void;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { Fido2CredentialView } from "../../../vault/models/view/fido2-credential.view";
|
||||
|
||||
export const UserRequestedFallbackAbortReason = "UserRequestedFallback";
|
||||
|
||||
export type UserVerification = "discouraged" | "preferred" | "required";
|
||||
@@ -20,10 +16,6 @@ export type UserVerification = "discouraged" | "preferred" | "required";
|
||||
export abstract class Fido2ClientService {
|
||||
isFido2FeatureEnabled: (hostname: string, origin: string) => Promise<boolean>;
|
||||
|
||||
availableAutofillCredentials$: (tabId: number) => Observable<Fido2CredentialView[]>;
|
||||
|
||||
autofillCredential: (tabId: number, credentialId: string) => Promise<void>;
|
||||
|
||||
/**
|
||||
* Allows WebAuthn Relying Party scripts to request the creation of a new public key credential source.
|
||||
* For more information please see: https://www.w3.org/TR/webauthn-3/#sctn-createCredential
|
||||
|
||||
@@ -45,6 +45,11 @@ export interface PickCredentialParams {
|
||||
* Bypass the UI and assume that the user has already interacted with the authenticator.
|
||||
*/
|
||||
assumeUserPresence?: boolean;
|
||||
|
||||
/**
|
||||
* Identifies whether a cipher requires a master password reprompt when getting a credential.
|
||||
*/
|
||||
masterPasswordRepromptRequired?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user