diff --git a/src/frontend/src/utils/findWebAuthnRpId.ts b/src/frontend/src/utils/findWebAuthnRpId.ts index a66d825d18..215d73bad6 100644 --- a/src/frontend/src/utils/findWebAuthnRpId.ts +++ b/src/frontend/src/utils/findWebAuthnRpId.ts @@ -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) =>