@next-auth/faunadb-adapter

0.0.1-pr.19.42 • Public • Published


FaunaDB Adapter - NextAuth.js

Open Source. Full Stack. Own Your Data.

Build Test Bundle Size Github Release

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

Dependents (0)

Package Sidebar

Install

npm i @next-auth/faunadb-adapter

Weekly Downloads

1

Version

0.0.1-pr.19.42

License

ISC

Unpacked Size

24.2 kB

Total Files

6

Last publish

Collaborators

  • thvu
  • ndom91
  • balazsorban
  • iaincollins