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

@oidfed/oidc

v1.0.0

Published

OpenID Connect and OAuth 2.0 federation flows — automatic and explicit client registration, Request Object validation, and RP/OP metadata processing as defined in OpenID Federation 1.0.

Downloads

914

Readme

@oidfed/oidc

OpenID Connect and OAuth 2.0 federation flows — automatic and explicit client registration, Request Object validation, and RP/OP metadata processing as defined in OpenID Federation 1.0.

Targets the final OpenID Federation 1.0 specification and its successor specifications:

Install

Choose the command for your preferred JavaScript package manager or runtime:

# npm
npm install @oidfed/core @oidfed/oidc

# pnpm
pnpm add @oidfed/core @oidfed/oidc

# yarn
yarn add @oidfed/core @oidfed/oidc

# bun
bun add @oidfed/core @oidfed/oidc

# Deno (Deno 2.0+ / JSR/npm specifier auto-resolution)
deno add npm:@oidfed/core npm:@oidfed/oidc

Quick Start

This package provides role classes that compose directly with Leaf, TrustAnchor, or Intermediate instances.

OIDC/OAuth protocol keys are separate from federation entity keys:

  • OIDC/OAuth roles publish OIDC/OAuth protocol public keys via jwks inside the role metadata configuration.
  • Federation Entity Configurations and other federation artifacts stay on federation key providers from @oidfed/core.
  • OIDC/OAuth helpers only require the read-only FederationKeyProvider; authority-owned rollover and historical keys stay on FederationKeyLifecycleProvider.

RP Composition Example

import { Leaf } from "@oidfed/leaf";
import { OidcRelyingPartyRole, StaticProtocolSigningKeyProvider } from "@oidfed/oidc";
import {
  createFederationSigningKey,
  JwkSigner,
  MemoryFederationKeyProvider,
} from "@oidfed/core";

const rpEntity = new Leaf({
  entityId: "https://rp.example.com",
  authorityHints: ["https://ta.example.org"],
  keyProvider: new MemoryFederationKeyProvider(
    createFederationSigningKey(federationSigningKey),
  ),
  metadata: {
    federation_entity: {
      organization_name: "My Relying Party",
    },
  },
  roles: [
    new OidcRelyingPartyRole({
      protocolKeyProvider: new StaticProtocolSigningKeyProvider({
        requestObjectSigner: new JwkSigner(protocolSigningKey),
      }),
      metadata: {
        redirect_uris: ["https://rp.example.com/callback"],
        response_types: ["code"],
        client_registration_types: ["automatic"],
        jwks: { keys: [protocolPublicKey] },
      },
    })
  ]
});

OP Composition Example

import { TrustAnchor, MemoryStorageAdapter } from "@oidfed/authority";
import { OidcProviderRole } from "@oidfed/oidc";
import { createTrustAnchorSet } from "@oidfed/core";

const opEntity = new TrustAnchor({
  entityId: "https://op.example.com",
  keyProvider,
  trustAnchors: createTrustAnchorSet([
    {
      entityId: "https://op.example.com",
      jwks: { keys: [opFederationPublicKey] },
    },
  ]),
  storage: new MemoryStorageAdapter(),
  metadata: {
    federation_entity: {
      federation_fetch_endpoint: "https://op.example.com/federation_fetch",
      federation_list_endpoint: "https://op.example.com/federation_list",
    },
  },
  roles: [
    new OidcProviderRole({
      registrationPath: "/register",
      metadata: {
        issuer: "https://op.example.com",
        authorization_endpoint: "https://op.example.com/auth",
        token_endpoint: "https://op.example.com/token",
        response_types_supported: ["code"],
        subject_types_supported: ["public"],
        id_token_signing_alg_values_supported: ["ES256"],
        client_registration_types_supported: ["automatic", "explicit"],
        jwks: { keys: [protocolPublicKey] },
      },
    })
  ]
});

Documentation

For a detailed API reference, OIDC role classes, automatic/explicit registration details, and metadata types, see the docs/packages/oidc.md file.

License

Apache-2.0 — see NOTICE for attribution.