Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created August 7, 2019 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/ad833d2e6f024a7189f8036641640658 to your computer and use it in GitHub Desktop.
Save miguelmota/ad833d2e6f024a7189f8036641640658 to your computer and use it in GitHub Desktop.
JavaScript check if webauthn api (fido/u2f) is supported in browser
const isSupported = () => {
return !(typeof navigator.credentials !== 'object' || typeof navigator.credentials.create !== 'function' || typeof navigator.credentials.get !== 'function')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment