JSPM

@conversokit/auth

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 347
  • Score
    100M100P100Q65006F
  • License Apache-2.0

Auth providers (API key, JWT/JWKS, Google/GitHub/Microsoft/Auth0 OAuth, Clerk, Supabase) and Express middleware for ConversoKit ChatGPT Apps.

Package Exports

  • @conversokit/auth
  • @conversokit/auth/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@conversokit/auth) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@conversokit/auth

Auth providers (API key, JWT/JWKS, Google/GitHub/Microsoft/Auth0 OAuth, Clerk, Supabase) and Express middleware for ConversoKit ChatGPT Apps.

Part of ConversoKit — a boilerplate for building ChatGPT Apps (Apps SDK / MCP) in <30 minutes.

Install

pnpm add @conversokit/auth express
# or
npm install @conversokit/auth express

Usage

import express from 'express';
import {
  createAuthMiddleware,
  apiKeyProvider,
  bearerJwtProvider,
} from '@conversokit/auth';

const app = express();

app.use(
  createAuthMiddleware({
    providers: [
      apiKeyProvider({ keys: process.env.API_KEYS!.split(',') }),
      bearerJwtProvider({ jwksUri: process.env.JWKS_URI! }),
    ],
    optional: false,
  }),
);

Providers chain and short-circuit on first success. The middleware sets req.conversokitAuth for downstream handlers. OAuth flow providers (GoogleOAuthProvider, GitHubOAuthProvider, etc.) drive /auth/:provider/login|callback.

Documentation

Full docs and runnable examples live in the main repo.

License

Apache-2.0 © Martín Aberastegue