-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/isomorphic #299
Merged
Merged
feat/isomorphic #299
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MasterKale
commented
Nov 23, 2022
packages/server/src/helpers/iso/isoCrypto/normalizeSHAAlgorithm.ts
Outdated
Show resolved
Hide resolved
MasterKale
commented
Nov 23, 2022
MasterKale
commented
Dec 2, 2022
This was referenced Dec 15, 2022
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 refactors SimpleWebAuthn to work in more runtimes than just Node. This is generally achieved by refactoring away references to Node-specific data classes, like
Buffer
, and referencing Web APIs in a way that should support use of @simplewebauthn/server in more non-Node runtimes than before.Non-isomorphic third-party dependencies have also been replaced, with efforts taken to prevent breaking changes to external API inputs and outputs.
Noteworthy changes:
Buffer
for method arguments that are now markedUint8Array
should not break, due to Node'sBuffer
being a subclass ofUint8Array
Registration
verifyRegistrationResponse()
are now aUint8Array
instead of aBuffer
aaguid
authData
clientDataHash
credentialID
credentialPublicKey
rpIdHash
Authentication
verifyAuthenticationResponse()
are now aUint8Array
instead of aBuffer
credentialID
Helpers (
@simplewebauthn/server/helpers
)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 typesisBase64URLString()
helper is nowisoBase64URL.isBase64url()
decodeCborFirst()
helper is nowisoCBOR.decodeFirst()
convertPublicKeyToPEM()
helper has been removed