1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 06:23:38 +00:00

update to use matchesUri

This commit is contained in:
Evan Bassler
2025-02-18 09:46:46 -06:00
parent 4d1d635c76
commit abae19c7f0

View File

@@ -62,27 +62,22 @@ export class Fido2CreateComponent implements OnInit {
) {}
async ngOnInit() {
console.log("fido2 create component");
this.session = this.fido2UserInterfaceService.getCurrentSession();
console.log(this.session, "session");
const rpid = await this.session.getRpId();
const equivalentDomains = await firstValueFrom(
this.domainSettingsService.getUrlEquivalentDomains(rpid),
);
console.log(rpid, "webdomain stuff");
this.cipherService
.getAllDecrypted()
.then((ciphers) => {
console.log(ciphers, "ciphers from url");
const relevantCiphers = ciphers.filter((cipher) => {
if (!cipher.login) {
if (!cipher.login || !cipher.login.hasUris) {
return false;
}
return (
cipher.login.uri === rpid &&
cipher.login.matchesUri(rpid, equivalentDomains) &&
(!cipher.login.fido2Credentials || cipher.login.fido2Credentials.length === 0)
);
});