ReferenceError: PublicKeyCredential is not defined
See original GitHub issueLooks like platformAuthenticatorIsAvailable
is missing a check for whether PublicKeyCredential is defined at all: https://github.com/MasterKale/SimpleWebAuthn/blob/master/packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts#L8. Maybe just add (await browserSupportsWebAuthn()) && ..
?
Also, minor nitpick: isPlatformAuthenticatorAvailable
would seem like a more sensible name to me since it’s actually phrased like a question and not a statements plus it’s a little closer to the original method name. Food for thought 😊
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to check browser is public-key credentials supported?
I am implementing webauthn using PHP, now I'm facing problem with how to detect browser is public-key credentials supported or not. If browser ......
Read more >Microsoft Edge 42.17134.1.0 -> Error: ReferenceError ... - GitHub
Error: ReferenceError: 'PublicKeyCredential' is not defined ... It is not detecting Windows Hello as FIDO2 authenticator on Windows 10 version 1903 while ...
Read more >PublicKeyCredential - Web APIs - MDN Web Docs - Mozilla
The PublicKeyCredential interface provides information about a public key / private key pair, which is a credential for logging in to a ...
Read more >How to fix "Uncaught ReferenceError: x is not defined" in ...
JS Casts 04 - How to fix "Uncaught TypeError: x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/04 for a summary ...
Read more >PublicKeyCredential (webauthn-server-core 2.2.0 API)
A map containing extension identifier → client extension output entries produced by the extension's client extension processing. @NonNull ByteArray. getId().
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah that came to me as well after writing my comment. I guess it doesn’t really matter as long as the naming is somewhat consistent - and your version is in fact more consistent with
browserSupportsWebAuthn
. Well, you know what they say about naming in programming 😄 . Anyway, enough with the bikeshedding 🙊This issue has been fixed in the new @simplewebauthn/browser@4.1.0.