web/flows: fix WebAuthn register stage
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
0b3980e564
commit
469ba3a391
|
@ -64,9 +64,9 @@ export class WebAuthnAuthenticatorRegisterStage extends BaseStage {
|
||||||
// post the transformed credential data to the server for validation
|
// post the transformed credential data to the server for validation
|
||||||
// and storing the public key
|
// and storing the public key
|
||||||
try {
|
try {
|
||||||
const formData = new FormData();
|
await this.host?.submit({
|
||||||
formData.set("response", JSON.stringify(newAssertionForServer));
|
response: newAssertionForServer
|
||||||
await this.host?.submit(formData);
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new Error(gettext(`Server validation of credential failed: ${err}`));
|
throw new Error(gettext(`Server validation of credential failed: ${err}`));
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue