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

@scalemule/ledvery

v0.0.2

Published

Ledvery TypeScript SDK — OIDC client for Ledvery relying parties (downstream ScaleMule apps + third-party integrations).

Readme

@scalemule/ledvery

TypeScript SDK for Ledvery — the organization ledger / OIDC identity service. Use this in any app that wants to let users sign in via Ledvery, regardless of whether it's a ScaleMule platform app or a third-party integration.

Install

npm install @scalemule/ledvery

Quick start

import { LedveryClient } from "@scalemule/ledvery";

const ledvery = new LedveryClient({
  issuer: "https://api.ledvery.com",          // or api-dev.ledvery.com
  clientId: "your-rp-client-id",
  clientSecret: process.env.LEDVERY_CLIENT_SECRET!,
  redirectUri: "https://your-app.com/auth/ledvery/callback",
});

// 1. Start the flow — in your sign-in route, redirect the browser here.
const { url, state, codeVerifier } = await ledvery.createAuthorizationUrl({
  scope: "openid email profile",
  nonce: crypto.randomUUID(),
});
// Stash `state` + `codeVerifier` in a signed cookie so the callback can
// recover them. (The SDK doesn't impose a storage mechanism.)
res.redirect(url);

// 2. In your callback route:
const session = await ledvery.exchangeCode({
  code: req.query.code as string,
  codeVerifier,             // from the cookie
  expectedState: state,     // from the cookie
  receivedState: req.query.state as string,
});
// session = { accessToken, idToken, claims: {sub, email, ...} }

// 3. Any time you need userinfo for a live access token:
const user = await ledvery.getUserInfo(session.accessToken);

What's in the box

  • createAuthorizationUrl() — generates a PKCE verifier + challenge, signs nothing (caller handles cookie storage), returns the full Ledvery /authorize URL.
  • exchangeCode() — validates state, POSTs to /token with client_secret_basic, verifies the returned ID token's RS256 signature against Ledvery's JWKS, parses claims.
  • verifyIdToken() — standalone helper if you already have an ID token (e.g. from a webhook).
  • getUserInfo() — calls /userinfo with a bearer access token.
  • discover() — fetches and caches /.well-known/openid-configuration. All other calls use this internally.

Design notes

  • Session storage is your problem. The SDK does not ship cookie code because different frameworks have incompatible opinions. Look at examples/next-app/ for a Next.js pattern.
  • JWKS is cached in-process for 10 minutes by default. That matches Ledvery's key-rotation grace period per the ADR.
  • PKCE is always on. Even confidential clients run PKCE — it costs nothing and closes code-interception attacks if redirect_uri is ever misconfigured.
  • No refresh tokens yet. Ledvery MVP issues 1-hour access + ID tokens; refresh is a tracked follow-up. This SDK will gain refresh() when the server does.

References