Closed JimmyDevPasto closed 1 month ago
Hello @JimmyDevPasto, sorry for the delayed response. Can you take a look at this comment in #577 and see if it's not the solution to your problem?
https://github.com/MasterKale/SimpleWebAuthn/issues/577#issuecomment-2141773422
People have had issues with credential public keys stored as Binary
values in Mongo that required converting them to Uint8Array
's as SimpleWebAuthn expects. If that comment fixes your issue then I'll add it to the docs as official guidance for other MongoDB users.
Best regards, I had not had time to correct the code with your suggestion, apparently it was an error in the way buffers are handled in mongo,
it was fixed with credentialPublicKey: new Uint8Array(passkey.publicKey), credentialID: new Uint8Array(passkey.id),
yes, it would be good if you put it in the documentation, but in a clearer way and with an example for mongo, since some of us use that database engine, I appreciate that you answered me and With that I was able to solve my problem, I congratulate you on your library, greetings.
El lun, 15 jul 2024 a la(s) 11:49 p.m., Matthew Miller ( @.***) escribió:
Hello @JimmyDevPasto https://github.com/JimmyDevPasto, sorry for the delayed response. Can you take a look at this comment in #577 https://github.com/MasterKale/SimpleWebAuthn/issues/577 and see if it's not the solution to your problem?
577 (comment)
https://github.com/MasterKale/SimpleWebAuthn/issues/577#issuecomment-2141773422
People have had issues with credential public keys stored as Binary values in Mongo that required converting them to Uint8Array's as SimpleWebAuthn expects. If that comment fixes your issue then I'll add it to the docs as official guidance for other MongoDB users.
— Reply to this email directly, view it on GitHub https://github.com/MasterKale/SimpleWebAuthn/issues/589#issuecomment-2230014522, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATDXOJKP54FTPUHK7E6HWETZMSQ5ZAVCNFSM6AAAAABKSAZBR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZQGAYTINJSGI . You are receiving this because you were mentioned.Message ID: @.***>
Thank you for confirming @JimmyDevPasto, I've gone ahead and added troubleshooting for this error to the docs because it seems to be a common pain point for SimpleWebAuthn users adding it to their Mongo-backed projects:
https://simplewebauthn.dev/docs/packages/server#error-no-data
Describe the issue
Best regards, when doing the same code managing a database with moongose it gives an error in the login-verify function when saving the access key in the user and when returning it the following error appears
I don't know if it's a library bug or if I'm saving my user schema with the wrong password.
I don't know if I'm saving the passkeys wrong in my mongo schema
Reproduction Steps
Expected behavior
Code Samples + WebAuthn Options and Responses
Dependencies
SimpleWebAuthn Libraries
Additional context