webauthn

NPM: @hexagon\webauthn | Deno.land: webauthn

Slim Webauthn library with ES6, Node and Deno support. Heavily based on fido2-lib, but with it's own set of pros (and cons).

Work in progress

Node.js CI Deno CI npm version NPM Downloads MIT License jsdelivr

Demo/Example for both Deno and Node available at github.com/Hexagon/webauthn-skeleton/tree/server/deno

Pros, compared to fido2-lib

  • Supports both Node and Deno with the same code base
  • Much less dependencies
  • Includes TypeScript typings
  • ToDo: Make this list complete with explanations

Cons, compared to fido2-lib

  • Lacks all Attestation-modes except "none"
  • Lacks MDS
  • All automated tests of fido2-lib isn't implemented

Installation

Node.js

npm install @hexagon/webauthn --save

JavaScript

// ESM Import ...
import webauthn from "@hexagon/webauthn";

// ... or CommonJS Require
const webauthn = require("@hexagon/webauthn");

TypeScript

import webauthn from "@hexagon/webauthn";

// ...

Deno

JavaScript

import webauthn from "https://cdn.jsdelivr.net/gh/hexagon/webauthn@0/src/deno/webauthn.js";

// ...

TypeScript

import { webauthn } from "https://cdn.jsdelivr.net/gh/hexagon/webauthn@0/src/deno/webauthn.js";

// ...

Documentation

Full documentation available at hexagon.github.io/webauthn.

Examples

Assuming you have imported webauthn as described under 'Installation'.

// ToDo: ...

Demo/Example for both Deno and Node available at github.com/Hexagon/webauthn-skeleton/tree/server/deno

Full API

Contributing

See Contribution Guide

Contributors

The underlying code is heavily based on github.com/webauthn-open-source/fido2-lib

License

MIT