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

@dnsid-ai/oidc

v0.24.1

Published

DNSid OIDC federation profile helpers.

Readme

@dnsid-ai/oidc

DNSid OIDC federation helpers for server-side token minting and verification.

Install

npm install @dnsid-ai/oidc

For Node.js local key loading, also install the aggregate SDK:

npm install @dnsid-ai/sdk @dnsid-ai/oidc

Mint an OIDC access token from server code

Use mintOIDCToken() when an agent service needs to call another service, gateway, or tool with a DNSid OIDC bearer token.

import { LocalKeyProvider } from '@dnsid-ai/sdk/node';
import { mintOIDCToken } from '@dnsid-ai/oidc';

const agentDomain = process.env.DNSID_DOMAIN!;
const audience = process.env.AGENTCORE_GATEWAY_AUDIENCE!;
const issuer = process.env.DNSID_OIDC_ISSUER;

const keyProvider = await LocalKeyProvider.load(
  process.env.DNSID_KEY_STORE ?? '.dnsid/keys.json',
);

const token = await mintOIDCToken({
  domain: agentDomain,
  keyProvider,
  audience,
  scopes: ['openid', 'dnsid'],
  issuer,
  serverUrl: issuer ? undefined : process.env.DNSID_SERVER_URL,
  timeoutMs: 5000,
});

await fetch(process.env.AGENTCORE_GATEWAY_URL!, {
  method: 'POST',
  headers: {
    authorization: `Bearer ${token.accessToken}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({ input: 'status' }),
});

Configure either:

  • issuer for explicit OIDC issuer discovery, which uses the discovered same-origin token_endpoint.
  • serverUrl for DNSid CLI-compatible server mode, which discovers the issuer from the server but posts to <serverUrl>/token.
  • issuer plus tokenEndpoint to bypass discovery when both values are already trusted configuration.

scope accepts the CLI-style space-separated string. scopes accepts an array and joins it with spaces. Empty scope values are omitted so the DNSid server default applies.

Private JWK input

Applications with private JWK material can use privateJwk directly:

import { mintOIDCToken } from '@dnsid-ai/oidc';

const token = await mintOIDCToken({
  domain: 'agent.example.com',
  privateJwk,
  issuer: 'https://oidc.dnsid.example',
  audience: 'https://gateway.example.com',
});

If the JWK has no kid, the SDK computes the RFC 7638 JWK thumbprint and uses that as the JWT header kid.

Verification boundaries

verifyOIDCToken(token, { issuer, audience, peerCert, timeoutMs, signal }) uses a 30-second overall default across discovery, JWKS and DNSid subject verification. Supply trusted current-peer evidence when the subject requires fl=mtls; it is forwarded on every invocation, including cache hits. Strict compact JSON parsing rejects duplicate members and malformed headers or NumericDates before discovery. Tokens are capped at 1 MiB, encoded headers at 16 KiB, and fetched JSON at 1 MiB. Expiration is rechecked after subject discovery without skew grace. Zero skew is respected; invalid explicit lifetimes fail. Injected transports/resolvers must honor cancellation and bounded-response contracts.

Server-side only

Do not mint DNSid OIDC tokens in browser or client code. The private key or signing provider must stay on trusted server infrastructure such as an AgentCore-hosted service, backend worker, KMS-backed signer, HSM, or equivalent server-side runtime.

Minting a token is not the trust decision. Receivers still verify the DNSid OIDC token, issuer, audience, signature, and DNSid subject status according to their verifier policy.