-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type Error: On AttestationConveyancePreference #215
Comments
Starting from scratch I completely removed my front end implementation of blazor and left hard coded values and basically came across the same error. My initial thought was that this line: Since I have an Asp.net Web Api back... it is not possible for me to create a session... is there any way around this? |
You would need to store the attestatoinOptions in a secure way (e.g. session) so that you can use them to verify the response you get back from the client. |
Ok... I did manage to store everything within the session... I followed the same method as in the example but I put it in the session on the client versus the server. However, even with this I am still getting the same error. See code example:
Here is my CredentialCreateOptions object returned from the server... see anything I am missing? ], }, |
Pretty sure we put this one to bed via https://stackoverflow.com/a/67139025/15356060. |
Yes, thank you... I meant to update it but have been sidetracked trying to finalize this project. |
I've been struggling with this for days. In short on line newCredential = await navigator.credentials.create({publicKey: options}); I am getting this error: "exception:TypeError: Failed to execute 'create' on 'CredentialsContainer': The provided value '2' is not a valid enum value of type AttestationConveyancePreference."
The browser is not liking the C# Enum AttestationConveyancePreference... it doen't matter if I set it to None, Indirect, or as in the case a value of '2' Direct. I do some JavaScript coding but it is not my strong suit... I believe it is a type error as according to the docs JavaScript seems to have a String Enum:
enum AttestationConveyancePreference {
"none",
"indirect",
"direct",
"enterprise"
};
My implementation must be wrong somehow as this surely would have been reported previously.... I am trying to convert a couple Asp.Net MVC examples over to a stand alone Blazor Web Assembly client with an API as the back end. So far everything seems to work well except this one line. Any help, thoughts or ideas would be greatly appreciated!
The text was updated successfully, but these errors were encountered: