web: fix WebAuthn not working when using the retry button

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-20 23:17:41 +01:00
parent d906738097
commit 18594c4886

View file

@ -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(