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

@ltikit/adapter-supabase

v1.0.0-rc.5

Published

Supabase/Postgres PlatformStore + NonceStore adapters for ltikit.

Readme

@ltikit/adapter-supabase

Supabase/Postgres PlatformStore + NonceStore for LTIkit. Bring your own Supabase project; this adds two small tables and maps them to the core stores.

Requires @ltikit/core.

npm i @ltikit/core @ltikit/adapter-supabase

1. Create the tables

The adapter needs two tables: lti_platforms (registered LMSs) and lti_nonces (OIDC handshake state). Pick one way to apply the schema:

Supabase CLI (recommended — versioned migration):

npx @ltikit/adapter-supabase > supabase/migrations/0001_ltikit.sql
supabase db push

Supabase Dashboard: open SQL Editor, paste the output of npx @ltikit/adapter-supabase, and run it.

Any Postgres (psql):

npx @ltikit/adapter-supabase | psql "$DATABASE_URL"

The script just prints the packaged schema (sql/0001_ltikit_tables.sql) to stdout, so you can review or edit it before applying. It uses create table if not exists and is safe to re-run.

2. Wire the stores

Use the service-role client — these stores are server-only and bypass RLS by design.

import { createClient } from '@supabase/supabase-js'
import { createLti, staticKeyStore } from '@ltikit/core'
import { supabasePlatformStore, supabaseNonceStore, type SupabaseLike } from '@ltikit/adapter-supabase'

const admin = createClient(process.env.SUPABASE_URL!, process.env.SUPABASE_SERVICE_ROLE_KEY!, {
  auth: { persistSession: false },
})
const client = admin as unknown as SupabaseLike // structurally compatible

export const lti = createLti({
  keys: staticKeyStore({ /* ...your tool keypair... */ }),
  platforms: supabasePlatformStore(client),
  nonces: supabaseNonceStore(client),
})

3. Register a platform

The adapter only reads platforms — you insert the row (once per LMS registration):

insert into lti_platforms (issuer, client_id, auth_endpoint, token_endpoint, keyset_url, deployment_id)
values (
  'https://canvas.instructure.com',
  'YOUR_CLIENT_ID',
  'https://canvas.instructure.com/api/lti/authorize_redirect',
  'https://canvas.instructure.com/login/oauth2/token',
  'https://canvas.instructure.com/api/lti/security/jwks',
  'YOUR_DEPLOYMENT_ID'
);

Coexisting with existing tables

Already have tables named lti_platforms / lti_nonces (e.g. another integration)? Don't let this schema collide — use custom names:

supabasePlatformStore(client, { table: 'ltikit_platforms' })
supabaseNonceStore(client, { table: 'ltikit_nonces' })

…and change the identifiers in the generated SQL to match before applying. (create table if not exists will otherwise silently skip a differently-shaped existing table, and the adapter will fail against the wrong columns.)

Notes

  • Single-use nonces are enforced atomically with delete ... returning — a replayed state finds nothing. Nonce carry-through (data) is stored as jsonb.
  • No hard dependency on @supabase/supabase-js: the client is accepted structurally (SupabaseLike), so any compatible client works and the package stays lightweight.
  • Also implements the writable MutablePlatformStore contract, so Dynamic Registration auto-persists new platforms with no manual insert.

Docs

Links

Repository · Issues · Need help? — paid setup/integration help available.

MIT