Cloudflare D1 storage adapter for @lti-tool/core.
npm install @lti-tool/d1
Apply the Drizzle migrations in drizzle/ to your D1 database, then pass the
binding to D1Storage.
import { LTITool } from '@lti-tool/core';
import { D1Storage } from '@lti-tool/d1';
const storage = new D1Storage({
database: env.DB,
});
const ltiTool = new LTITool({
storage,
// ... other config
});
This adapter creates prefixed tables:
lti_tool_clientslti_tool_deploymentslti_tool_sessionslti_tool_nonceslti_tool_registration_sessionsThe prefix keeps LTI storage separate from application tables in a shared D1 database.