Closed rpg2014 closed 12 months ago
Was searching around github a bit more and found this issue: https://github.com/MasterKale/SimpleWebAuthn/issues/61, specifically this comment: https://github.com/MasterKale/SimpleWebAuthn/issues/61#issuecomment-707309815.
I'm using yarn, so adding
"resolutions": {
"@peculiar/asn1-schema": "2.0.8"
},
to my package.json (the top level one in a mono-repo), fixed the issue.
I'll leave this issue open for another day or so to increase the visibility, but my issue has been resolved!
Could you look into adding this gotcha to your docs somewhere (maybe a new troubleshooting section on the server page)? I'm sure other people will run into this issue at some point!
@rpg2014 Nice find, yarn strikes again 🫠
If you have to specify a resolution in your project, check that the version of asn1-schema is up to date with what's used by @simplewebauthn/server. If you still have to specify 2.0.8 then that sounds like a bug in the @peculiar series of libraries (since those libraries are well past 2.0.8) and I'll look into possibly logging a bug over there.
I've since bumped the version to 2.3.8, the latest, which also works correctly.
Interestingly, removing the "resolutions"
doesn't seem to affect it now, it must have fixed the version in the yarn.lock.
Node dependency resolution makes my head hurt, so I'm just going to close this issue, and hope google points people to this fix
Describe the issue
Hi, thanks for this library! I'm running into the following error when calling the verifyAuthenticationResponse function in the
@simplewebauthn/server
package, and was hoping I could get some help debugging. Here is the error and stack trace:I'm thinking it's related to the allowed algorithms when generating the registration options, but I haven't been able to resolve it, trying both leaving the
supportedAlgorithms
field blank and explicitly providingsupportedAlgorithmIDs: [-7, -257],
when generating the registration options. Do you have any ideas as to what I'm missing here?Reproduction Steps
I'm able to reproduce it with my local project, I can provide exact steps if needed. Its jsut going through the auth flow.
Expected behavior
I expect the verification to succeed, or at least fail with a different error, (invalid key, verification failed: invalid algorithm or something like that).
Code Samples + WebAuthn Options and Responses
Relevant code snippet:
Below is the JSON object being passed into
verifyAuthenticationResponse
. I've masked a few of the fields, but let me know if they're needed to debug. I can also provide the options if neededDependencies
SimpleWebAuthn Libraries
Additional context
I've tested explicitly stating the supported algorithms as
supportedAlgorithmIDs: [-7, -257],
, leaving out [-8], but that leads to the same error.Let me know if I can provide any additional info to debug this error! Any help you could provide would be awesome, thanks!