Conversation
|
Tests are broken because of an issue with module resolution in @cloudflare/vitest-pool-workers. They don't like imports of folders with an index.js file (e.g. errors/index.js) as See here: cloudflare/workers-sdk#6286 (comment) What's annoying is that the code is otherwise fine - it executes as expected when hitting http://localhost:8787/registration/options. It's only the testing environment that's having problems 😞 |
|
Oh nice upgrading @cloudflare/vitest-pool-workers@0.4.21 fixed the tests 🎉 |
|
@timcappalli I'm curious what you think about this as a direction for the API to go. I basically modeled it after what's on https://webauthn.io. There's still some things missing (sessions to store challenges for, persistence of challenges, etc...) but I want to make sure this is good so far before I merge it and move on. |
| const opts = await generateRegistrationOptions({ | ||
| rpID: RP_ID, | ||
| rpName: RP_NAME, | ||
| userName, |
There was a problem hiding this comment.
| userName, | |
| userName: username, |
This threw me being case sensitive and wasn't expecting a capital N
This PR fleshes out the
GET /registration/optionsendpoint to support the following options as query params:userName(Required): StringuserID(Optional): base64url string of bytes (defaults to random ID generated by SimpleWebAuthn)userVerification(Optional): Either'discouraged','preferred', or'required'(defaults to'preferred')attestation(Optional): Either'none'or'direct'(defaults to'none')attachment(Optional): Either'cross-platform'or'platform'algES256(Optional): Boolean (defaults totrue)algRS256(Optional): Boolean (defaults totrue)discoverableCredential(Optional): Either'discouraged','preferred', or'required'(defaults to'required')