To complete registration you'll need the same header values as used in Initiate Authentication
Request Spec
HTTP Method: POST
Headers:
X-Scope-Id: A UUID string representing the application scope.
X-Encrypted-Key: A string containing the encrypted key for secure communication.
X-Encrypted-User: The user input encrypted using the encryption key
Body:
encrypted_assertion: A string containing the encrypted user assertion data.
To create an encrypted_assertion, first have to decrypt the encrypted_request_challenge from the response in Initiate Authentication, with the following functions.
constrequest_challenge_str=awaitaesDecrypt(initAuthResponse.result.encrypted_request_challenge, aesKey);constrequest_challenge_json=JSON.parse(request_challenge_str) // Once you have the credential creation options you can create a webauthn compatible // assertion / signature e.g by using the broswer navigator.credentials.get// functionconstassertion=navigator.credentials.get(request_challenge_json);
You can then encrypt the attestation with your AES Key and send it as part of the request