npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pk-auth/passkeys-browser

v2.0.0

Published

pk-auth browser SDK: WebAuthn ceremonies + admin operations against the pk-auth wire contract.

Readme

@pk-auth/passkeys-browser

Zero-dependency TypeScript SDK for the pk-auth wire contract. Published to npm as @pk-auth/passkeys-browser; its version tracks the pk-auth server release it speaks to. The example apps in this repo consume it via a relative dist/ import (built by Gradle) rather than the published package. See RELEASE.md for the publish steps.

npm install @pk-auth/passkeys-browser

API

import { PkAuthClient } from "@pk-auth/passkeys-browser";

const pk = new PkAuthClient({
  apiBase: "/",
  getToken: () => localStorage.getItem("pk-jwt"),
});

// Registration
await pk.ceremonies.register({ username: "alice", label: "MacBook" });

// Sign-in
const { token } = await pk.ceremonies.authenticate({ username: "alice" });
localStorage.setItem("pk-jwt", token);

// Admin (require a token)
await pk.admin.listCredentials();
await pk.admin.regenerateBackupCodes();

Two clients are exposed independently if a host only needs one half:

  • PkAuthCeremonyClientstartRegistration, register, startAuthentication, authenticate.
  • PkAuthAdminClientlistCredentials, renameCredential, removeCredential, regenerateBackupCodes, remainingBackupCodes, startEmailVerification, completeEmailVerification, startPhoneVerification, completePhoneVerification, getAccount.

Conditional UI

await pk.ceremonies.authenticate({ conditional: true });

Wires mediation: "conditional" into the underlying navigator.credentials.get call, so the browser can offer passkeys via autofill UI before the user clicks "Sign in."

Overriding ceremony paths

All three adapters (Spring Boot, Dropwizard, Micronaut) mount the ceremony endpoints at the same /auth/passkeys/... paths, which are the SDK defaults — no per-adapter override is needed. The paths option remains an escape hatch for hosts that remount the endpoints under a custom prefix:

new PkAuthCeremonyClient(options, {
  paths: {
    startReg: "/api/auth/passkeys/registration/start",
    finishReg: "/api/auth/passkeys/registration/finish",
    startAuth: "/api/auth/passkeys/authentication/start",
    finishAuth: "/api/auth/passkeys/authentication/finish",
  },
});

Build / test

npm install
npm test         # vitest, jsdom env
npm run build    # tsup → dist/index.{js,cjs,d.ts}

dist/ is gitignored — Gradle's :buildPasskeysBrowserSdk task (defined in the root build.gradle.kts) runs npm ci && npm run build before each demo's processResources, so the bundle is regenerated from source on every fresh clone. Run the npm commands above directly when iterating on the SDK in isolation.