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
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ export function hexEncode(buf: Uint8Array): string {
*/ */
export function transformCredentialCreateOptions(credentialCreateOptions: PublicKeyCredentialCreationOptions): PublicKeyCredentialCreationOptions { export function transformCredentialCreateOptions(credentialCreateOptions: PublicKeyCredentialCreationOptions): PublicKeyCredentialCreationOptions {
const user = credentialCreateOptions.user; 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 challenge = u8arr(credentialCreateOptions.challenge.toString());
const transformedCredentialCreateOptions = Object.assign( const transformedCredentialCreateOptions = Object.assign(