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

@openknot-ts/auth0-actor

v0.0.6-preview

Published

Optional Auth0 verified-identity mapping.

Readme

@openknot-ts/auth0-actor

Verifies Auth0 access tokens and maps their claims to the application's actor, independently of any transport. It includes jose and configures JWT verification and JWKS discovery; applications supply the issuer, audience and mapActor.

Usage

import { provideAuth0 } from "@openknot-ts/auth0-actor/wire";
import { config } from "@openknot-ts/wire";
import { z } from "zod";

const settings = config({
  AUTH0_ISSUER: z.url(),
  AUTH0_AUDIENCE: z.string().min(1),
});

const identity = provideAuth0({
  requirements: { settings },
  factory: ({ settings }) => ({
    issuer: settings.AUTH0_ISSUER,
    audience: settings.AUTH0_AUDIENCE,
    mapActor: (claims) => ({ userId: claims.sub }),
  }),
});

API

| Entry | Export | Description | | --- | --- | --- | | @openknot-ts/auth0-actor | auth0Resolver({ issuer, audience, mapActor, jwks?, verification? }) | An actor resolver, usable without Wire. | | @openknot-ts/auth0-actor/wire | provideAuth0({ requirements?, factory }) | Provides Flow's executionActorResolver when its declared settings are available. |

  • jwks takes jose's RemoteJWKSetOptions: timeouts, headers, caching, customFetch.
  • verification takes native tuning such as clock tolerance, subject, maximum age and extra required claims. It cannot remove the Auth0 contract.

Verification

  • One remote key set per application, at the issuer's /.well-known/jwks.json; jose owns fetching, caching and refresh.
  • Tokens must be RS256, match the issuer and audience, have a valid exp and a non-empty sub, and satisfy nbf when present. Only verified claims reach mapActor, which may be async.
  • Invalid tokens, claims and unknown keys produce ActorAuthenticationError. JWKS network failures, malformed key sets and mapping failures keep their own identity.
  • Raw tokens never reach the actor or telemetry. Business facts such as an event's createdBy belong in the event, not in a restored token.

Transports

tRPC uses this module through trpcAuthentication from @openknot-ts/trpc-context/wire, or @openknot-ts/auth0-authentication builds the middleware from the same options. Another RPC calls auth0Resolver or the resolved executionActorResolver in its own context or middleware and passes the actor to Flow.

Tests

pnpm --filter @openknot-ts/auth0-actor test uses real signatures and local JWKS servers: claims, algorithms, unknown keys, caching, infrastructure failures, mapping, cancellation and conditional Wire composition, without an Auth0 tenant.