Differences in the Return Values of the RequestNewCredential Method in v4.0.0 #602
-
I'm trying to migrate to v4.0.0. Upon checking, unlike v3.0.1, CredentialCreateOptions no longer inherits from Fido2ResponseBase, so it appears the status field and errorMessage field are no longer included in the JSON. The demo application code is as follows, but how should we actually check it correctly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As mentioned in the PR, the base class was removed because the library never utilised the fields. If an API method of the library fails, it would throw and exception. You should catch it and "consume" it any way that is meaningful to your app. In the demo we return a json value that has the status variable and an error message: https://github.com/passwordless-lib/fido2-net-lib/blob/main/Demo/Controller.cs#L83. In our demo app, I believe we only ever set |
Beta Was this translation helpful? Give feedback.
PR for context
As mentioned in the PR, the base class was removed because the library never utilised the fields.
If an API method of the library fails, it would throw and exception. You should catch it and "consume" it any way that is meaningful to your app.
In the demo we return a json value that has the status variable and an error message: https://github.com/passwordless-lib/fido2-net-lib/blob/main/Demo/Controller.cs#L83. In our demo app, I believe we only ever set
status
to "error".