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

@kinde/jwt-validator

v0.5.0

Published

Simple library to validate JWT tokens

Readme

Kinde JWT validator

Description

Simple library to validate JWT tokens

Installation

# npm
npm install @kinde/jwt-validator
# yarn
yarn add @kinde/jwt-validator
# pnpm
pnpm install @kinde/jwt-validator

Usage

import { validateToken, type jwtValidationResponse } from "@kinde/jwt-validator";

const validationResult: jwtValidationResponse = await validateToken({
  token: "eyJhbGc...",
  domain: "https://mybusiness.kinde.com"
});

Optional claim checks

All checks are opt-in. Passing any of the options below also enables exp and nbf validation (a token without exp is rejected) and rate-limits the re-fetch of signing keys to once per minute per domain.

Without any options, the default WebCrypto path checks only the signature, so an expired token is reported as valid. Pass at least one option (for example clockTolerance: 0) to enforce exp and nbf.

Because re-fetches are limited to once a minute, a token signed with a newly rotated key can be rejected for up to 60 seconds after the last fetch.

const validationResult = await validateToken({
  token: "eyJhbGc...",
  domain: "https://mybusiness.kinde.com",
  issuer: "https://mybusiness.kinde.com",
  audience: "my-api",
  clockTolerance: 5,
  algorithms: ["RS256"],
});

| Option | Type | Description | | ---------------- | -------------------- | -------------------------------------------------------------- | | issuer | string | Expected iss claim. | | audience | string \| string[] | Accepted aud values. The token must contain at least one. | | clockTolerance | number | Seconds of leeway applied to exp and nbf. Defaults to 0. | | algorithms | string[] | Allowed values for the token header alg. |

Signatures are always verified as RS256, the only supported algorithm. algorithms checks the value declared in the token header and cannot enable other algorithms.

Kinde documentation

Kinde Documentation - Explore the Kinde docs

Contributing

If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes.
  4. Submit a pull request.

Development and testing

The development toolchain requires Node.js 22.12 or newer and the pnpm version pinned in package.json. These are development requirements, not consumer runtime requirements.

pnpm install --frozen-lockfile
pnpm lint
pnpm build
pnpm test:coverage --run

Tests use Vitest 5. Always await asynchronous assertions such as expect(promise).rejects and expect(promise).resolves; unawaited assertions fail the test.

License

By contributing to Kinde, you agree that your contributions will be licensed under its MIT License.