FaunaDB Adapter - NextAuth.js
Open Source. Full Stack. Own Your Data.
Overview
This is the Fauna 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/faunadb-adapter
npm install --save-prod next-auth @next-auth/faunadb-adapter
- Add this adapter to your
/src/pages/api/[...nextauth].js
next-auth configuration object.
import NextAuth from "next-auth"
import Providers from "next-auth/providers"
import Adapter from "@next-auth/faunadb-adapter"
import faunadb from "faunadb"
const faunaClient = new faunadb.Client({
secret: process.env.FAUNADB_SECRET_KEY,
});
export default NextAuth({
providers: [
Providers.Google({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET,
}),
],
adapter: Adapter({faunaClient}),
...
})
Options
// TODO
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