Skip to content

Commit

Permalink
Fix issue with undefined rpId
Browse files Browse the repository at this point in the history
  • Loading branch information
lmuntaner committed Dec 18, 2024
1 parent 26dda81 commit 5fcf4a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/utils/findWebAuthnRpId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export const excludeCredentialsFromOrigins = (
return credentials;
}
// Change `undefined` to the current origin.
const originsToExclude = Array.from(rpIds).map(
(origin) => `https://${origin}` ?? currentOrigin
const originsToExclude = Array.from(rpIds).map((origin) =>
origin === undefined ? currentOrigin : `https://${origin}`
);
return credentials.filter(
(credential) =>
Expand Down

0 comments on commit 5fcf4a0

Please sign in to comment.