diff --git a/CHANGELOG.md b/CHANGELOG.md index 58fd17af..866089d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Added + +- Dispatch webauthn:unsupported for browsers missing parseOptionsFromJSON [#127](https://github.com/cedarcode/devise-webauthn/pull/127) [@santiagorodriguez96] + ### Changed - Options for getting or creating passkeys and security keys are now served by dedicated Rails controllers and retrieved via JavaScript fetch requests. [#73](https://github.com/cedarcode/devise-webauthn/pull/73) [@nicolastemciuc] diff --git a/app/assets/javascript/devise/webauthn.js b/app/assets/javascript/devise/webauthn.js index 7639a31d..1725d798 100644 --- a/app/assets/javascript/devise/webauthn.js +++ b/app/assets/javascript/devise/webauthn.js @@ -3,7 +3,9 @@ function isWebAuthnSupported() { navigator.credentials && navigator.credentials.create && navigator.credentials.get && - window.PublicKeyCredential + window.PublicKeyCredential && + PublicKeyCredential.parseCreationOptionsFromJSON && + PublicKeyCredential.parseRequestOptionsFromJSON ); }