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

@mita-auth/core

v0.1.0

Published

Framework-agnostic core: DPoP signing, nonce generation, and the shared Zod schemas behind a Zod-free main entry.

Readme

@mita-auth/core

Framework-agnostic core of Mita: DPoP signing and verification (RFC 9449), nonce generation, and the Zod schemas both halves of the wire protocol share.

🚧 0.x — the public API may still change between minor releases. Pin a minor range if that matters to you.

Most projects do not depend on this package directly — @mita-auth/client and @mita-auth/server both re-use it and pull it in themselves. Reach for it when you are writing your own client or server half.

Install

pnpm add @mita-auth/core

What it contains

| Area | Exports | | --- | --- | | DPoP | generateDPoPKeyPair, importDPoPKeyPair, exportDPoPKeyPair, signDPoP, verifyDPoP, calculateJkt | | Nonces | generateNonce, createNonce, isNonceExpired, timingSafeEqual | | Wire format | MITA_HEADERS, DPOP_AUTH_SCHEME, COMPACT_JWT_PATTERN, … | | Errors | MitaError, DPoPVerificationError, isMitaError, isDPoPVerificationError | | Schemas (/schemas) | commentSchema, createCommentSchema, securityEnvelopeSchema, nonceSchema, … |

Usage

import { generateDPoPKeyPair, signDPoP, verifyDPoP } from '@mita-auth/core';

const keyPair = await generateDPoPKeyPair(); // ES256, non-extractable

const proof = await signDPoP(keyPair, {
  method: 'POST',
  url: 'https://api.example.com/comments',
  nonce, // omitted on the very first request; the server answers with one
});

// On the server:
const { jti, jkt } = await verifyDPoP(proof, {
  method: request.method,
  url: request.url,
  nonce,
});

The Zod schemas live behind their own entry point:

import { commentSchema } from '@mita-auth/core/schemas';

Notes

  • Zod is not in the main entry, deliberately. An entry point is the one boundary a package can promise; how a bundler splits chunks behind it, and whether your bundler then shakes the unused half back out, is an implementation detail neither side controls. Keeping /schemas separate is therefore what puts ~16 kB gzip out of reach of a browser that only signs proofs, rather than merely likely to. Ask for it when you want the validation, and it costs nothing when you do not.
  • Zero I/O by design. verifyDPoP cannot detect a replay on its own: record the jti it returns for the proof's acceptance window. @mita-auth/server does that with Upstash Redis.
  • Web Crypto only. No Node-only API is used, and the package is compiled against the WebWorker lib with types: [] so that stays true. It runs on Node, browsers, Cloudflare Workers, Vercel Edge and Deno alike.
  • Keys are generated non-extractable and held in memory, so closing a tab leaves nothing behind.

License

MIT