mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[PM-5302] Refactor Passkey feature enable/disable logic (#7242)
* feat: add missing tests for `isFido2FeatureEnabled` * feat: add user logged in check * chore: rewrite with cartesian product * chore: remove test The test was more complex than the actual function, removing. * feat: add domain exclusion * feat: add origin equal vault case * chore: clean up the old code from `content-secript` * feat: return early to avoid making api calls * fix: prettier linting * fix: incorrect logic inversion --------- Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com> Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
This commit is contained in:
@@ -264,7 +264,7 @@ export default class RuntimeBackground {
|
||||
this.abortManager.abort(msg.abortedRequestId);
|
||||
break;
|
||||
case "checkFido2FeatureEnabled":
|
||||
return await this.main.fido2ClientService.isFido2FeatureEnabled();
|
||||
return await this.main.fido2ClientService.isFido2FeatureEnabled(msg.hostname, msg.origin);
|
||||
case "fido2RegisterCredentialRequest":
|
||||
return await this.abortManager.runWithAbortController(
|
||||
msg.requestId,
|
||||
|
||||
Reference in New Issue
Block a user