Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/v3' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Dec 22, 2023
2 parents 987ce7d + c0277d4 commit 5930a7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/pages/database/sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ const adapter = new BunSQLiteAdapter(db, {

### Cloudflare D1

`CloudflareD1Adapter` takes a `D1Database` instance and a list of table names.
`D1Adapter` takes a `D1Database` instance and a list of table names.

Since the D1 binding is included with the request, create an `initializeLucia()` function to create a new `Lucia` instance on every request.

```ts
import { Lucia } from "lucia";
import { CloudflareD1Adapter } from "@lucia-auth/adapter-sqlite";
import { D1Adapter } from "@lucia-auth/adapter-sqlite";

export function initializeLucia(D1: D1Database) {
const adapter = new CloudflareD1Adapter(D1, {
const adapter = new D1Adapter(D1, {
user: "user",
session: "session"
});
Expand Down

0 comments on commit 5930a7f

Please sign in to comment.