From 18594c4886645d21343e4908723270ff46263fe2 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 20 Mar 2021 23:17:41 +0100 Subject: [PATCH] web: fix WebAuthn not working when using the retry button Signed-off-by: Jens Langhammer --- web/src/flows/stages/authenticator_webauthn/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/flows/stages/authenticator_webauthn/utils.ts b/web/src/flows/stages/authenticator_webauthn/utils.ts index e6c064a6d..c49e33345 100644 --- a/web/src/flows/stages/authenticator_webauthn/utils.ts +++ b/web/src/flows/stages/authenticator_webauthn/utils.ts @@ -27,7 +27,7 @@ export function hexEncode(buf: Uint8Array): string { */ export function transformCredentialCreateOptions(credentialCreateOptions: PublicKeyCredentialCreationOptions): PublicKeyCredentialCreationOptions { const user = credentialCreateOptions.user; - user.id = u8arr(credentialCreateOptions.user.id.toString()); + user.id = u8arr(b64enc(credentialCreateOptions.user.id as Uint8Array)); const challenge = u8arr(credentialCreateOptions.challenge.toString()); const transformedCredentialCreateOptions = Object.assign(