From 469ba3a39188999bc0007261fc2b559110dffbab Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 25 Mar 2021 10:07:23 +0100 Subject: [PATCH] web/flows: fix WebAuthn register stage Signed-off-by: Jens Langhammer --- .../WebAuthnAuthenticatorRegisterStage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/flows/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts b/web/src/flows/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts index 84b10ca90..664086260 100644 --- a/web/src/flows/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts +++ b/web/src/flows/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts @@ -64,9 +64,9 @@ export class WebAuthnAuthenticatorRegisterStage extends BaseStage { // post the transformed credential data to the server for validation // and storing the public key try { - const formData = new FormData(); - formData.set("response", JSON.stringify(newAssertionForServer)); - await this.host?.submit(formData); + await this.host?.submit({ + response: newAssertionForServer + }); } catch (err) { throw new Error(gettext(`Server validation of credential failed: ${err}`)); }