lucia-mikro-orm-adapter
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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,
});

Package Sidebar

Install

npm i lucia-mikro-orm-adapter

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

13.2 kB

Total Files

5

Last publish

Collaborators

  • anteprimorac