0.0.1-pr.19.42 • Published 3 years ago

@next-auth/faunadb-adapter v0.0.1-pr.19.42

Weekly downloads
37
License
ISC
Repository
-
Last release
3 years ago

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

  1. Install next-auth and @next-auth/faunadb-adapter
npm install --save-prod next-auth @next-auth/faunadb-adapter
  1. 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,
});

// 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: [
    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