Skip to main content

Registration result codes

After the result of the operation is returned, your frontend needs to react accordingly. The result contents enable you to decide whether the registration is successful.

The result has the following members:

success booleanThe member indicates whether the registration is successful.
code.statusCode enumThe enumeration reports the success code or the various error codes for the session.
code.message stringA short human-readable message about the result of the transaction.
token stringYou can use the transaction token to verify whether the operation is executed by your Authentication Cloud instance, see Status endpoint.
message stringOnly present in case of an error when it provides a more verbose description of the failure.

All the registration error codes are in the form of error-10XX.

On success, the user is considered logged in. For security reasons, check the validity of the response independently of the registration process, by verifying the token using the Authentication Cloud API introspection endpoint. On failure, handle the error as in the following example:

 if (result.success) {
// result.code.statusCode ->
// "success-registration" is a successful registation,
// result.message contains more information in a human-readable format.
else {
// Handle the error, you can find more details in result.code and result.message
alert("There was a problem: " + result.code.message);

Example success result object:

"success": true,
"code": {
"statusCode": "success-registration",
"message": "Successfully registered WebAuthn credential."
"token": "eyJhbGciOiJIUzUxMiJ9.eyJpc...ifQ.suBhl...cX-lE0_FRKrTDcLA"

Example failure result object:

"success": false,
"code": {
"statusCode": "error-1001",
"message": "Failed to create WebAuthn credential."
"message": "Error while trying to create new credential. NotAllowedError: The operation either timed out or was not allowed. See:"
Result codeDescriptionComment
success-registrationSuccessfully registered WebAuthn credential.
error-1000Invalid credentialCreationOptions. ServerPublicKeyCredentialCreationOptions has to be valid.The credentialCreationOptions object is missing or invalid. Make sure you pass in the credentialCreationOptions, which is returned in the registration response.
error-1001Failed to create WebAuthn credential.An error prevented creating a WebAuthn credential. See result.message for more information.
error-1002Error while registering the new credential on serverAn error occurred while sending the attestation result data to Authentication Cloud API to finalize the registration. See result.message for more information.
error-1003Missing statusToken. Cannot be null or undefined.The statusToken parameter was missing. Make sure you pass in the statusToken, which is returned in the registration response.
error-1004WebAuthn is not supported by this browser.Make sure that you use a browser which supports creating and authenticating with a FIDO2 / WebAuthn credential.
error-1099Unknown error while registration.See result.message for more information.


You are now ready to take on the API and get going with your own FIDO2 registration flow, see Enrollment.

For more information on how to continue with authentication, see Authenticate using FIDO2.