Skip to content

Storage adapters

LTIkit needs two things persisted:

  • NonceStore — the OIDC handshake state. Must be single-use + TTL (replay defense). Short-lived.
  • PlatformStore — the registry of trusted LMSs. Durable config.

Pick the backing store below. (See How it fits together for where these sit.)

Both stores, against any Prisma-supported database (SQLite, Postgres, MySQL, …) — SQLite means zero external service. Copy the two models into your schema; full setup on the Prisma adapter page.

import { PrismaClient } from '@prisma/client'
import { prismaPlatformStore, prismaNonceStore } from '@ltikit/adapter-prisma'
const prisma = new PrismaClient()
// in createLti({ ... }):
platforms: prismaPlatformStore(prisma),
nonces: prismaNonceStore(prisma),

No hard dependency on @prisma/client — the client is accepted structurally, so any generated PrismaClient matching the two models works.