Installation

Install the package, pick your entry points, and check runtime requirements.

npm install passkify

No peer dependencies, no post-install step, and nothing to configure at install time.

Entry points

The package has two halves that never run in the same place.

passkifyserver (Node)
passkify/serverserver (Node)
passkify/clientbrowser
import { PasskeyServer, MemoryStore } from 'passkify';        // Node
import { register, login } from 'passkify/client';            // browser

Requirements

Node>= 18
Module formatESM and CommonJS
TypeScriptoptional, >= 5.0
HTTPSrequired in production

Browser support

Passkeys work in every current browser. The features that are newer than the base API degrade rather than break.

FeatureChromeSafariFirefoxEdge
WebAuthn67146018
Passkeys (discoverable, synced)10816122108
Conditional UI (autofill)10816119108

passkify/client feature-detects all of it. isSupported(), isPlatformAuthenticatorAvailable() and isAutofillAvailable() let you decide what to show; see the client API.

Runtime footprint

Runtime dependencies0
Browser bundle~6.5 kB gzipped

Why zero dependencies is a feature here, not a slogan

Verify the install

import { PasskeyServer, MemoryStore } from 'passkify';
 
const passkeys = new PasskeyServer({
  rpName: 'Test',
  origin: 'http://localhost:3000',
  store: new MemoryStore(),
});
 
const { options } = await passkeys.startRegistration({ username: 'ada' });
console.log(options.rp.id);          // 'localhost'
console.log(options.challenge);      // 43 base64url characters

If the constructor throws, read the message. Configuration errors are checked eagerly and name the fix; see configuration.