Skip to content

mohamedhoss123/lucia-typeorm-adapter

Repository files navigation

lucia-adapter-typeorm

typeorm adapter for lucia

Installation

npm i lucia-adapter-typeorm

usage

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published