fix register

This commit is contained in:
Max Peintner
2023-06-27 18:08:22 +02:00
parent f334f0fb3b
commit 6fcb1ae8e8
4 changed files with 24 additions and 7 deletions

View File

@@ -95,7 +95,7 @@ export default function RegisterPasskey({ sessionId, isPrompt }: Props) {
resp.publicKeyCredentialCreationOptions.publicKey.user.id =
coerceToArrayBuffer(
resp.publicKeyCredentialCreationOptions.publicKey.user.id,
"challenge"
"userid"
);
if (
resp.publicKeyCredentialCreationOptions.publicKey.excludeCredentials
@@ -140,7 +140,9 @@ export default function RegisterPasskey({ sessionId, isPrompt }: Props) {
),
},
};
return submitVerify(passkeyId, "", data, sessionId);
return submitVerify(passkeyId, "", data, sessionId).then(() => {
router.push("/accounts");
});
} else {
setLoading(false);
setError("An error on registering passkey");