@next-auth/mikro-orm-adapter
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published


    

Mikro ORM Adapter - NextAuth.js

Open Source. Full Stack. Own Your Data.

CI Test Bundle Size @next-auth/mikro-orm-adapter Version

Overview

This is the MikroORM Adapter for next-auth. This package can only be used in conjunction with the primary next-auth package. It is not a standalone package.

Getting Started

  1. Install next-auth and @next-auth/mikro-orm-adapter

    npm install next-auth @next-auth/mikro-orm-adapter@next
  2. Add this adapter to your pages/api/[...nextauth].ts next-auth configuration object.

    import NextAuth from "next-auth"
    import { MikroOrmAdapter } from "@next-auth/mikro-orm-adapter"
    
    // For more information on each option (and a full list of options) go to
    // https://next-auth.js.org/configuration/options
    export default NextAuth({
       // https://next-auth.js.org/configuration/providers
       providers: [],
       adapter: MikroOrmAdapter({
          dbName: "./db.sqlite",
          type: "sqlite",
          debug: process.env.DEBUG === "true" || process.env.DEBUG?.includes("db"),
          ...
       }, {
          // pass extended models as { entities: { } } if needed
       }),
       ...
    });

Contributing

We're open to all community contributions! If you'd like to contribute in any way, please read our Contributing Guide.

License

ISC

/@next-auth/mikro-orm-adapter/

    Package Sidebar

    Install

    npm i @next-auth/mikro-orm-adapter

    Weekly Downloads

    64

    Version

    3.0.1

    License

    ISC

    Unpacked Size

    22.5 kB

    Total Files

    7

    Last publish

    Collaborators

    • thvu
    • ndom91
    • balazsorban
    • iaincollins