question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What to do about `supportsWebAuthn()`...

See original GitHub issue

As highlighted in PR #112 and #113, @simplewebauthn/browser’s supportsWebAuthn() method can’t actually execute in browsers that don’t support WebAuthn, like IE11 and Edge Legacy, because those browsers don’t support ES2018 syntax. This negates the reason for its existence.

As I mentioned in PR #113, the path forward is ambiguous to me. It’s likely not as simple as updating packages/browser/tsconfig.json to target ES5 instead of ES2018.

Possible options I proposed included:

  • Maybe there’s a way to build the code with Webpack that lets developers pick-and-choose which version of the library they want to use in their code.
  • Maybe the solution is another library that’s only the supportsWebAuthn() method built for ES5 environments.
  • A third alternative is I just nuke supportsWebAuthn() and update the docs to say, “if you need to support IE11/Edge Legacy, here’s a snippet of VanillaJS you can copy-paste into your code to tell if WebAuthn is available.”

I’m open to suggestions on how we might solve the problem of building a library that simultaneously needs to sometimes support ES5 while often supporting ES2018.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:95 (93 by maintainers)

github_iconTop GitHub Comments

4reactions
Moumoulscommented, May 5, 2021
2reactions
MasterKalecommented, Apr 18, 2021

I finally got a new release out - this should now be fixed in @simplewebauthn/browser@3.0.0! 🎉

See https://github.com/MasterKale/SimpleWebAuthn/releases/tag/v3.0.0 for more info.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does my browser support WebAuthn?
An overview of all modern browser and their support for WebAuthn platform and roaming authenticators.
Read more >
Detect browser support for WebAuthn - Twilio
You can check for WebAuthn support by checking for PublicKeyCredential in ... isUserVerifyingPlatformAuthenticatorAvailable() method.
Read more >
WebAuthn
An introduction to Web Authentication (WebAuthn), the new API that can replace passwords with strong authentication.
Read more >
FIDO2: Web Authentication (WebAuthn) - FIDO Alliance
WebAuthn is currently supported in Google Chrome, Mozilla Firefox, Microsoft Edge and Apple Safari web browsers, as well as Windows 10 and Android...
Read more >
WebAuthn Is Great and It Sucks | Okta Security
Everything supports WebAuthn! Great! ... We are at a cusp of having universal support for WebAuthn! All major operating systems and browsers have ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found