Skip to content

Commit

Permalink
CR review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmuntaner committed Dec 12, 2024
1 parent 74c9116 commit 3b24699
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/frontend/src/utils/multiWebAuthnIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ export class MultiWebAuthnIdentity extends SignIdentity {
return this._actualIdentity.sign(blob);
}

const currentUrl = new URL(window.location.origin);
const userAgent = window.navigator.userAgent;
const rorDomains = relatedDomains();
const rpId =
DOMAIN_COMPATIBILITY.isEnabled() && supportsWebauthRoR(userAgent)
? findWebAuthnRpId(currentUrl.origin, this.credentialData, rorDomains)
DOMAIN_COMPATIBILITY.isEnabled() &&
supportsWebauthRoR(window.navigator.userAgent)
? findWebAuthnRpId(
window.location.origin,
this.credentialData,
relatedDomains()
)
: undefined;

const result = (await navigator.credentials.get({
Expand Down

0 comments on commit 3b24699

Please sign in to comment.