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

@quickguidehealth/connector-logto-oidc-pkce

v0.1.4

Published

Logto OIDC social connector with PKCE (RFC 7636) support

Readme

Logto Connector: OIDC with PKCE

npm version License: MPL-2.0

A Logto social connector that adds optional PKCE (Proof Key for Code Exchange, RFC 7636) support to the standard OpenID Connect authorization code flow.

It is a drop-in fork of @logto/connector-oidc v1.7.1 with one extra config flag — enablePkce — and a separate connector factory id (oidc-pkce) so it can coexist with the upstream OIDC connector.

When you need this

The stock @logto/connector-oidc does not emit code_challenge / code_verifier. Identity providers that require PKCE on the authorization code flow will reject Logto's authorization request with:

PKCE flow requires both code_challenge and code_challenge_method

Providers known to require this:

  • Supabase Auth
  • Logto-hosted IdPs configured for public clients
  • QuickPJ / other providers built on top of public-client OAuth libraries

Installation

npm install @quickguidehealth/connector-logto-oidc-pkce

For Logto running in Kubernetes, install via the chart's customConnectors.packages array (matches the existing pattern used for @quickguidehealth/connector-logto-novu):

logto:
  customConnectors:
    enabled: true
    packages:
      - "@quickguidehealth/[email protected]"

Configuration

Same shape as the upstream @logto/connector-oidc config, plus a single enablePkce flag:

{
  "authorizationEndpoint": "https://example.com/authorize",
  "tokenEndpoint": "https://example.com/token",
  "clientId": "your-client-id",
  "clientSecret": "your-client-secret",
  "tokenEndpointAuthMethod": "client_secret_basic",
  "responseType": "code",
  "grantType": "authorization_code",
  "scope": "openid profile email",
  "enablePkce": true,
  "idTokenVerificationConfig": {
    "jwksUri": "https://example.com/.well-known/jwks.json"
  }
}

Set enablePkce: true to opt into PKCE. With the flag absent or false the connector behaves identically to the upstream @logto/connector-oidc.

How PKCE works here

When enablePkce is true:

  1. On /authorize, the connector generates a fresh code_verifier (32 random bytes, base64url-encoded — 256 bits of entropy, well above the RFC 7636 minimum).
  2. It computes code_challenge = BASE64URL(SHA256(code_verifier)) and appends code_challenge and code_challenge_method=S256 to the authorization URL.
  3. The code_verifier is persisted in the connector session storage.
  4. On /token, the connector retrieves the stored code_verifier and includes it in the token request body alongside the authorization code.
  5. The IdP recomputes SHA256(code_verifier) and rejects the token request if it doesn't match the stored code_challenge — preventing authorization-code interception attacks.

Only the S256 method is implemented. plain is intentionally not supported.

Coexistence with @logto/connector-oidc

The connector is registered with id: 'oidc-pkce', distinct from upstream's id: 'oidc', so both connectors can be installed at the same time. In the Logto admin console you'll see two factories side-by-side:

  • OIDC — upstream, no PKCE
  • OIDC (with PKCE) — this package

Pick the one your provider needs.

Compatibility

  • Logto 1.38.0 or later (ships @logto/connector-kit ^5.0.0).
  • Node.js 22.x or later.

License

MPL-2.0, inherited from upstream @logto/connector-oidc. The modified files (src/index.ts, src/utils.ts, src/types.ts, src/constant.ts) remain MPL-2.0 per the file-level copyleft of the license.

Attribution

Forked from @logto/connector-oidc v1.7.1 (Silverhand Inc.). PKCE helpers adapted from @logto/connector-x.