Neo4j Adapter - NextAuth.js
Open Source. Full Stack. Own Your Data.
Overview
This is the Neo4j Adapter for next-auth
. This package can only be used in conjunction with the primary next-auth
package. It is not a standalone package.
You can find the Neo4j schema in the docs at next-auth.js.org/adapters/neo4j.
Getting Started
- Install
neo4j-driver
, next-auth@beta
and @next-auth/neo4j-adapter@next
npm install neo4j-driver next-auth@beta @next-auth/neo4j-adapter@next
- Add this adapter to your
pages/api/[...nextauth].js
next-auth configuration object.
import NextAuth from "next-auth"
import neo4j from "neo4j-driver"
import { Neo4jAdapter } from "@next-auth/neo4j-adapter"
const driver = neo4j.driver(
"bolt://localhost",
neo4j.auth.basic("neo4j", "password")
)
const neo4jSession = driver.session()
export default NextAuth({
providers: [],
adapter: Neo4jAdapter(neo4jSession),
...
})
Contributing
We're open to all community contributions! If you'd like to contribute in any way, please first read our Contributing Guide.
License
ISC