webauthn is a free, open source identity & access management (iam) project written in TypeScript and released under MIT. It has 612 GitHub stars, 60 forks and 1 open issues, and was last pushed 4 months ago. On this registry it ranks #39 of 39 tracked projects in Identity & Access Management (IAM), with 5 head-to-head comparisons available.

What is webauthn?

The @passwordless-id/webauthn library is an open-source, dependency-free TypeScript helper that wraps the WebAuthn protocol so passkey registration, authentication and verification take only a few lines of code, and it is aimed at web developers who want passwordless sign-in in the browser and on the server without hand-writing the protocol.

What it is

The project is a helper library for passkeys and the WebAuthn protocol, published on npm as @passwordless-id/webauthn under the MIT licence. It lives in the JavaScript and TypeScript ecosystem, and one base package contains both a client submodule for the browser and a server submodule for the backend. The authors describe it as open source, opinionated, dependency-free and minimalistic, and it is documented at webauthn.passwordless.id alongside hosted demos. The repository shows 612 stars, 60 forks and one open issue, last pushed in May 2026.

The concrete problem it solves is the distance between the raw browser WebAuthn API and a working sign-in flow. Registering a credential, prompting for an authenticator, and verifying the resulting registration or authentication response against the values the server expects are steps a developer would otherwise implement directly against the W3C WebAuthn protocol. This library replaces that hand-written plumbing with client.register(), client.authenticate(), server.verifyRegistration() and server.verifyAuthentication(), leaving the challenge and the server-side checks explicit while the protocol details are handled for you.

Key capabilities

  • A client submodule exposes register(), which takes a challenge and a user and by default registers a passkey on any local or roaming authenticator.
  • The same client submodule exposes authenticate(), which by default triggers the native passkey selection dialog, also for local or roaming authenticators with preferred user verification.
  • A server submodule exposes verifyRegistration() and verifyAuthentication(), which check a registration or authentication response against the expected values.
  • Both submodules come from one npm package as named client and server imports, and the documentation notes that the brackets in the import statement are important.
  • Browsers can load the library from a CDN link, including from inside a script, and a CommonJS variant supports older Node stacks through require, though its use is discouraged.
  • The package is dependency-free, and its universal build needs Node.js 19 or later because earlier versions did not expose WebCrypto globally.
  • Plain, unminified HTML/JS demos cover a basic flow, passkeys autocomplete (conditional UI), a testing playground and an authenticators list.

Who uses it and how

  • Teams adding passwordless sign-in to an existing web application, using the client submodule for browser prompts and the server submodule for verification from the same codebase.
  • Developers evaluating passkeys or testing authenticator behaviour, who can open the hosted demos and the testing playground in a browser with no build step and read the unminified sources.
  • Applications that want passkeys offered through the native autocomplete experience, which the conditional UI demo illustrates.
  • Node.js backends on version 19 or later that perform verification server-side, since the universal build depends on globally available WebCrypto.

Getting started

The recommended installation is npm install @passwordless-id/webauthn, after which the client and server submodules are imported from that one package; browsers may instead import the client directly from the jsDelivr CDN link.

How it compares

The facts provided name no paid products that this library replaces and no comparable libraries, so in this registry it stands alone rather than belonging to a group of alternatives. What distinguishes it here is the MIT licence, a single package covering both client and server roles, and the absence of runtime dependencies.

When to use it — and when not to

Nothing in the facts indicates a hosted service: the challenge is described as a random buffer from the server, so a self-hoster supplies challenge generation, storage and the verification endpoints around the library. Teams held back on Node.js below version 19, or those needing a maintained CommonJS build, should weigh the universal build requirement and the removal of the browser field in version 2.4 and later, which caused problems with how tooling interpreted it. The README is short and example-driven, and version 2 was a complete overhaul with breaking changes, so adopters should expect to read the changelog and the verification documentation.

project readme (upstream, from github) — read inline

@passwordless-id/webauthn

NPM Version npm bundle size NPM Downloads GitHub Repo stars GitHub Sponsors

banner

This library greatly simplifies the usage of passkeys by invoking the WebAuthn protocol more conveniently. It is open source, opinionated, dependency-free and minimalistic.

Note: in the latest version 2.4+, the browser field was removed in package.json due to issues how various tooling interpret it. Check out #108 for more details.

👀 Demos

These demos are plain HTML/JS, not minimized. Just open the sources in your browser if you are curious.

📦 Installation

Modules (recommended)

npm install @passwordless-id/webauthn

The base package contains both client and server side modules. You can import the client submodule or the server depending on your needs.

import {client} from '@passwordless-id/webauthn'
import {server} from '@passwordless-id/webauthn'

Note: the brackets in the import are important!

Alternatives

For browsers, it can be imported using a CDN link in the page, or even inside the script itself.

<script type="module">
  import { client } from 'https://cdn.jsdelivr.net/npm/@passwordless-id/webauthn';
</script>

Lastly, a CommonJS variant is also available for old Node stacks, to be imported using require('@passwordless-id/webauthn'). It's usage is discouraged though, in favor of the default ES modules.

Note that at least NodeJS 19+ is necessary. (The reason is that previous Node versions had no WebCrypto being globally available, making it impossible to have a "universal build")

🚀 Getting started

There are multiple ways to use and invoke the WebAuthn protocol. What follows is just an example of the most straightforward use case.

Registration

import {client} from '@passwordless-id/webauthn'
await client.register({
  challenge: 'a random base64url encoded buffer from the server',
  user: 'John Doe'
})

By default, this registers a passkey on any authenticator (local or roaming) with preferred user verification. For further options, see → Registration docs

Authentication

import {client} from '@passwordless-id/webauthn'
await client.authenticate({
  challenge: 'a random base64url encoded buffer from the server'
})

By default, this triggers the native passkey selection dialog, for any authenticator (local or roaming) and with preferred user verification. For further options, see → Authentication docs

Verification

import {server} from '@passwordless-id/webauthn'
await server.verifyRegistration(registration, expected)
await server.verifyAuthentication(authentication, expected)

→ Verification docs

📃 Changelog

The version 2 introduced breaking changes, different default behavior and different intermediate format. Basically, it's a complete overhaul and to understand "why" this version 2 was made, I recommend reading this blog post. In a very summarized way, it is to enhance support for security keys by default, reflect latest changes in the underlying specs and improve cross-compatibility with other server side libraries.

Some core changes are:

  • Use platform authenticator by default => authenticator selection pops up by default
  • authenticatorType was removed => use hints instead
  • User verification default: required => preferred
  • Timeout: 1 minute => no timeout
  • Response format changed
  • Transports as part of allowCredentials

The docs for the legacy version 1.x are found here

✅ Supported Platforms

Client side:

  • ✅ Chrome
  • ✅ Edge
  • ✅ Firefox
  • ✅ Safari
  • ✅ Opera
  • ❌ (old) Internet Explorer 11

Basically, it supports all browsers that support WebAuthn API including the getPublicKey() and getPublicKeyAlgorithm() methods. Note that it might also depend on the password manager used, which will also be supported as long as it is specification compliant.

Server side:

  • ✅ NodeJS 19+
  • ✅ Cloudflare Workers
  • ✅ All other JS platforms that support WebCrypto API
  • ✅ All other server side libraries of other programming languages, as long as they use the default payload generated by the WebAuthn API.

Note: apparently, native iOS / macOS clients written in Switft are not compatible with the server-side part of this library, as they do not provide the publicKey and publicKeyAlgorithm properties during registration in the first place. See #95.

Frequently asked questions

Is webauthn free to use?

webauthn is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does webauthn do?

Webauthn / passkeys helper library to make your life easier. Client side, server side and demo included.

What is webauthn written in?

webauthn is primarily written in TypeScript. Its source is publicly available at https://github.com/passwordless-id/webauthn, and it has 612 GitHub stars.