-
-
Notifications
You must be signed in to change notification settings - Fork 190
Differences in the Return Values of the RequestNewCredential Method in v4.0.0 #602
-
I'm trying to migrate to v4.0.0.
My application had been checking that the status field in the makeCredentialOptions response JSON was "ok", which caused it to break.
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.
All reactions
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".
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 status
to "error".
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thank you for your reply.
I had overlooked that code in Controller.cs.
This is a great help. I should be able to continue with the migrations.
Beta Was this translation helpful? Give feedback.