Skip to content

Commit ef58c35

Browse files
Merge pull request #127 from cedarcode/sr--handle-new-webauthn-api-unsupported
Dispatch `webauthn:unsupported` for browsers missing `parseOptionsFromJSON`
2 parents ae97743 + 0a24c25 commit ef58c35

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Added
6+
7+
- Dispatch webauthn:unsupported for browsers missing parseOptionsFromJSON [#127](https://github.com/cedarcode/devise-webauthn/pull/127) [@santiagorodriguez96]
8+
59
### Changed
610

711
- Change `webauthn_id` generation from `after_initialize` to `before_validation` and add a data backfill to the `webauthn_id` migration generator for existing records. [@santiagorodriguez96]

app/assets/javascript/devise/webauthn.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ function isWebAuthnSupported() {
33
navigator.credentials &&
44
navigator.credentials.create &&
55
navigator.credentials.get &&
6-
window.PublicKeyCredential
6+
window.PublicKeyCredential &&
7+
PublicKeyCredential.parseCreationOptionsFromJSON &&
8+
PublicKeyCredential.parseRequestOptionsFromJSON
79
);
810
}
911

0 commit comments

Comments
 (0)