Unable to read challenge for startRegistration #660
Closed
yonghongzz
started this conversation in
Troubleshooting
Replies: 1 comment 1 reply
-
Hello @yonghongzz, as of v11 you'll need to pass in your options as the const response = await startRegistration({ optionsJSON: options }); Check out Breaking Changes in the v11 release notes for more info: https://github.com/MasterKale/SimpleWebAuthn/releases/tag/v11.0.0 Sorry for the confusion! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The options object is :
{
"challenge": "YgVM7nNVEgrbS1fnp5Nbx8bSp-uZvdxGCgfcmdfb5z4",
"rp": {
"name": "FSDP",
"id": "localhost"
},
"user": {
"id": "nQqmhT2Po3QM1uRoSpYe7U6oIoJ3Giiq7xdlHvImG4w",
"name": "[email protected]",
"displayName": ""
},
"pubKeyCredParams": [
{
"alg": -8,
"type": "public-key"
},
{
"alg": -7,
"type": "public-key"
},
{
"alg": -257,
"type": "public-key"
}
],
"timeout": 60000,
"attestation": "none",
"excludeCredentials": [],
"authenticatorSelection": {
"residentKey": "preferred",
"userVerification": "preferred",
"requireResidentKey": false
},
"extensions": {
"credProps": true
},
"hints": []
}
but when i pass it in using
const registerJSON = await startRegistration(options);
it shows the error
index.umd.min.js:2 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'challenge')
at e.startRegistration (index.umd.min.js:2:4892)
Beta Was this translation helpful? Give feedback.
All reactions