chore(deps): update dependency @simplewebauthn/server to v7 #7409
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
6.2.2
->7.0.0
Release Notes
MasterKale/SimpleWebAuthn
v7.0.0
Compare Source
The highlight of this release is the rearchitecture of @simplewebauthn/server to start allowing it to be used in more environments than Node. This was accomplished by refactoring the library completely away from Node's
Buffer
type andcrypto
package, and instead leveragingUint8Array
and the WebCrypto Web API for all cryptographic operations. This means that, hypothetically, this library can now also work in any non-Node environment that provides access to the WebCrypto API on the globalcrypto
object.Existing Node support is still first-class! In fact because @simplewebauth/server still builds to CommonJS it will continue to be tricky to incorporate the library in non-Node, ESM-only environments that do not support CommonJS modules (whether natively, via a bundler, etc...) A future update will attempt to fix this to offer better support for use in ESM-only projects with support for WebCrypto (e.g. Deno).
Please read all of the changes below! There are significant breaking changes in this update and additional information has been included to help adapt existing projects to the newest version of these libraries.
Packages:
Changes:
@simplewebauthn/server/helpers
now includes several new helpers for working with WebAuthn-related data types that should work in all run times:isoCBOR
for working with CBOR-encoded valuesisoCrypto
for leveraging the WebCrypto API when working with various WebAuthn/FIDO2 data structuresisoBase64URL
for encoding and decoding values into base64url (with optional base64 support)isoUint8Array
for working withUint8Array
scose
for working with COSE-related methods and typesBreaking Changes
verifyRegistrationResponse()
are now aUint8Array
instead of aBuffer
. They will need to be passed intoBuffer.from(...)
to convert them toBuffer
if needed:aaguid
authData
clientDataHash
credentialID
credentialPublicKey
rpIdHash
verifyAuthenticationResponse()
are now aUint8Array
instead of aBuffer
. They will need to be passed intoBuffer.from(...)
to convert them toBuffer
if needed:credentialID
isBase64URLString()
helper is nowisoBase64URL.isBase64url()
decodeCborFirst()
helper is nowisoCBOR.decodeFirst()
convertPublicKeyToPEM()
helper has been removedRegistrationCredentialJSON
type has been replaced by theRegistrationResponseJSON
typeAuthenticationCredentialJSON
type has been replaced by theAuthenticationResponseJSON
typeRegistrationCredentialJSON.transports
has been relocated intoRegistrationResponseJSON.response.transports
to mirror response structure in the WebAuthn specverifyRegistrationResponse()
method has had itscredential
argument renamed toresponse
verifyAuthenticationResponse()
method has had itscredential
argument renamed toresponse
generateRegistrationOptions()
now marks user verification as"preferred"
during registration and authentication (to reduce some user friction at the browser+authenticator level), and requires user verification during response verification. See below for refactor tips (#307)Refactor Tips
RP's implementing a second-factor flow with WebAuthn, where UV is not important (because username+password are provided before WebAuthn is leveraged for the second factor), should not require user verification when verifying responses:verifyRegistrationResponse()
Before
After
verifyAuthenticationResponse()
Before
After
generateRegistrationOptions()
now defaults to preferring the creation of discoverable credentials. See below for refactor tips (#324)Refactor Tips
RP's that do not require support for discoverable credentials from authenticators will need to update their calls to `generateRegistrationOptions()` accordingly:generateRegistrationOptions()
Before
After
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.