Skip to content
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/webauthn-L3-json-types #320

Merged
merged 17 commits into from
Dec 28, 2022
Merged

feat/webauthn-L3-json-types #320

merged 17 commits into from
Dec 28, 2022

Conversation

MasterKale
Copy link
Owner

@MasterKale MasterKale commented Dec 28, 2022

This PR updates the typescript-types, browser, and server packages with new JSON serialization-related types and functions as defined in L3 of the WebAuthn specification.

The new PublicKeyCredential.parseCreationOptionsFromJSON(), PublicKeyCredential.parseRequestOptionsFromJSON(), and PublicKeyCredential.toJSON() methods have been added to typescript-types, but browser package will not make use of them.

The "simpler" use of SimpleWebAuthn will always be to pair browser with server, if an RP doesn't want to think about it. However, because of the way in which SimpleWebAuthn methods are being updated in this PR, RP's that choose to eschew use of browser for these JSON methods should gradually become able to spin their own front end logic with the official API methods and still use the values and methods from server for options and verification.

Breaking Changes

  • The RegistrationCredentialJSON type has been replaced by the RegistrationResponseJSON type
  • The AuthenticationCredentialJSON type has been replaced by the AuthenticationResponseJSON type
  • RegistrationResponseJSON.transports has been relocated into RegistrationCredentialJSON.response.transports to mirror response structure in the WebAuthn spec
  • @simplewebauthn/server's verifyRegistrationResponse() method has had its credential argument renamed to response
  • @simplewebauthn/server's verifyAuthenticationResponse() method has had its credential argument renamed to response

@MasterKale MasterKale added enhancement New feature or request package:browser @simplewebauthn/browser package:server @simplewebauthn/server package:types @simplewebauthn/typescript-types labels Dec 28, 2022
@MasterKale MasterKale merged commit 76c7a46 into master Dec 28, 2022
@MasterKale MasterKale deleted the feat/webauthn-L3-json-types branch December 28, 2022 06:02
@MasterKale MasterKale removed the enhancement New feature or request label Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:browser @simplewebauthn/browser package:server @simplewebauthn/server package:types @simplewebauthn/typescript-types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant