Drizzle support for Lucia v3? #1351
-
I get a type error when I try to use Drizzle so I'm assuming its not supported yet? db/index.tsimport { drizzle } from 'drizzle-orm/better-sqlite3'
import sqlite from 'better-sqlite3'
const client = sqlite(process.env.SQLITE_URL)
export const db = drizzle(client) auth/lucia.tsimport { BetterSqlite3Adapter } from '@lucia-auth/adapter-sqlite'
import { Lucia } from "lucia";
import { db } from '@/app/db/index'
import { tableNames } from '@/app/db/schema'
const adapter = new BetterSqlite3Adapter(db, tableNames) I get an error on
I was trying to update my project on Lmk if I'm doing something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
There's already a Drizzle adapter https://v3.lucia-auth.com/database/drizzle You have to pass |
Beta Was this translation helpful? Give feedback.
-
@pilcrowonpaper bdw sqlite docs on drizzle have inconsistent naming. |
Beta Was this translation helpful? Give feedback.
There's already a Drizzle adapter
https://v3.lucia-auth.com/database/drizzle
You have to pass
client
instead ofdb
in your code