JSPM

lucia-mikro-orm-adapter

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q19489F
  • License MIT

Mikro ORM adapter for Lucia auth library

Package Exports

  • lucia-mikro-orm-adapter

Readme

lucia-mikro-orm-adapter

Mikro ORM adapter for Lucia auth library.

Installation

npm i -S lucia-mikro-orm-adapter

Usage

import { lucia } from "lucia";
import { mikroORMAdapter, User, Session, UserKey } from "lucia-mikro-orm-adapter";

export const orm = await MikroORM.init({
  // register auth entities
  entities: [User, Session, UserKey],
  // ...
});

export const auth = lucia({
  adapter: mikroORMAdapter(orm),
  // ...
});

Options

You can pass custom entities to the adapter through the options object. This is useful if you want to extend the default entities or use your own.

mikroORMAdapter(orm, {
  User,
  Session,
  UserKey,
});