typeorm adapter for lucia
npm i lucia-adapter-typeorm
the typeorm adapter need you to pass the datasourse and the entity of (user,session,key)
import { AppDataSource } from "../models/datasourse.js";
import { user } from "../models/user.entity.js";
import { key } from "../models/key.entity.js";
import { session } from "../models/session.entity.js";
export const auth = lucia({
adapter: typeorm(AppDataSource, {
user,
key,
session
})
// ...
});
for schema example go here