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

@orangecheck/auth-core

v2.5.0

Published

OrangeCheck session JWT primitives. Verifies oc_session tokens against the auth host's published JWKS — no env vars, no JWK handling. Re-exported by @orangecheck/me-client for integrators; also used by family consumer subdomains directly.

Readme

@orangecheck/auth-core

Full reference: docs.ochk.io/sdk/auth-core — auto-generated from the TypeScript source on every release. Hand-written prose below is the high-level overview; the docs site is the source of truth for every export, type, and signature.

Cross-subdomain session primitives for the OrangeCheck ecosystem.

A ~3 KB package that handles:

  • Ed25519 JWT sign / verify with jose
  • Cross-subdomain cookie serialize / clear / parse
  • Typed SessionPayload (sub, did_oc, jti, …)

No React, no DB, no framework. Usable from Node, Edge, or browser.

The model

There is one auth host (by convention https://ochk.io) that holds the private JWK and issues tokens. Every consumer subdomain (attest.ochk.io, lock.ochk.io, docs.ochk.io, …) only holds the public JWK and verifies locally — no network round-trip.

The session cookie is set with Domain=.ochk.io, so once a user signs in on any subdomain, every other subdomain sees them as signed-in immediately.

Install

yarn add @orangecheck/auth-core

Generate a key pair

node scripts/gen-auth-keys.mjs
# → prints OC_AUTH_KID, OC_AUTH_PRIVATE_JWK, OC_AUTH_PUBLIC_JWK

OC_AUTH_PRIVATE_JWK lives only on the auth host. The public JWK + KID go on every subdomain.

On the auth host

import { signSession, serializeSessionCookie } from '@orangecheck/auth-core';

const token = await signSession(
    { sub: accountId, did_oc: didOc, jti: crypto.randomUUID() },
    {
        kid: process.env.OC_AUTH_KID!,
        privateJwk: process.env.OC_AUTH_PRIVATE_JWK!,
        publicJwk: process.env.OC_AUTH_PUBLIC_JWK!,
        issuer: 'https://ochk.io',
    },
    60 * 60 * 24 * 30
);

res.setHeader(
    'Set-Cookie',
    serializeSessionCookie(token, { domain: '.ochk.io', maxAge: 60 * 60 * 24 * 30 })
);

On any consumer subdomain

import { readSessionCookie, verifySessionToken } from '@orangecheck/auth-core';

const token = readSessionCookie(req.headers.cookie);
if (!token) return res.status(401).end();

const payload = await verifySessionToken(token, {
    publicJwk: process.env.OC_AUTH_PUBLIC_JWK!,
    issuer: 'https://ochk.io',
});

if (!payload) return res.status(401).end();

// payload.did_oc is the opaque user identifier (did:oc:<32-hex>).

Guarantees

  • No shared secret. Consumer apps cannot forge sessions — only the auth host can, because only it holds the private key.
  • Offline-verifiable. Given the public JWK, any process can verify a token — no database, no auth server round-trip.
  • Stateless. Revocation is the caller's problem. This package does crypto only; if you need immediate-revoke semantics, layer a DB check on the auth host.

License

MIT.