diff --git a/Demo/wwwroot/js/usernameless.login.js b/Demo/wwwroot/js/usernameless.login.js index 341e999b..d9b7905f 100644 --- a/Demo/wwwroot/js/usernameless.login.js +++ b/Demo/wwwroot/js/usernameless.login.js @@ -78,7 +78,7 @@ async function verifyAssertionWithServer(assertedCredential) { let clientDataJSON = new Uint8Array(assertedCredential.response.clientDataJSON); let rawId = new Uint8Array(assertedCredential.rawId); let sig = new Uint8Array(assertedCredential.response.signature); - let userHandle = new Uint8Array(assertedCredential.response.userHandle) + let userHandle = assertedCredential.response.userHandle ? new Uint8Array(assertedCredential.response.userHandle) : null; const data = { id: assertedCredential.id, rawId: coerceToBase64Url(rawId), @@ -87,7 +87,7 @@ async function verifyAssertionWithServer(assertedCredential) { response: { authenticatorData: coerceToBase64Url(authData), clientDataJSON: coerceToBase64Url(clientDataJSON), - userHandle: userHandle !== null ? coerceToBase64Url(userHandle): null, + userHandle: userHandle ? coerceToBase64Url(userHandle): null, signature: coerceToBase64Url(sig) } };