Mikro ORM Adapter - NextAuth.js
Open Source. Full Stack. Own Your Data.
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
-
Install next-auth
and @next-auth/mikro-orm-adapter
npm install next-auth @next-auth/mikro-orm-adapter@next
-
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"
export default NextAuth({
providers: [],
adapter: MikroOrmAdapter({
dbName: "./db.sqlite",
type: "sqlite",
debug: process.env.DEBUG === "true" || process.env.DEBUG?.includes("db"),
...
}, {
}),
...
});
Contributing
We're open to all community contributions! If you'd like to contribute in any way, please read our Contributing Guide.
License
ISC