Files
archived-next-auth/packages/adapter-mikro-orm
Thang Vu 4f29d39521 chore: move to pnpm (#4420)
* feat: pnpm

* Update publish script

* gitignore the pnpm debug log

* Fix workspace

* Fix dev commands

* feat: pnpm

* Update publish script

* gitignore the pnpm debug log

* Fix workspace

* Fix dev commands

* chore: fix pnpm install in GitHub Action

* fix: update tsconfig path

* pnpm run -> pnpm

* chore: remove cache-node and add back setup-node

* fix: tsconfig dependencies

* chore: fix tsconfig path

* fix: adapter-test dependencies

* fix: setup-node for release-pr

* fix: import adapter-test

* chore: update workspace dependency for next-auth

* fix: test failure

* fix: add jest for adapters

* fix: jest again

* fix: mongo in prisma

* fix: `--no-git-checks` for `release-pr`

Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-05-03 15:05:55 +02:00
..
2022-02-20 01:11:21 +01:00
2022-05-03 15:05:55 +02:00
2022-05-03 15:05:55 +02:00
2022-05-03 15:05:55 +02:00


    

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