0.1.0 • Published 2 years ago

@bruno_crosier/edgedb-adapter v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Overview

This is the EdgeDB 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 EdgeDB schema in the docs at next-auth.js.org/adapters/edgedb.

Getting Started

  1. Install next-auth and @next-auth/edgedb-adapter as well as edgedb and @edgedb/generate.
npm install next-auth edgedb @next-auth/edgedb-adapter
npm install @edgedb/generate --save-dev
  1. Add this adapter to your pages/api/[...nextauth].js next-auth configuration object.
import NextAuth from "next-auth"
import GoogleProvider from "next-auth/providers/google"
import { EdgeDBAdapter } from "@next-auth/edgedb-adapter"
import { createClient } from "edgedb"

const client = createClient()

// 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: EdgeDB(client)
  ...
})

Contributing

We're open to all community contributions! If you'd like to contribute in any way, please read our Contributing Guide.

License

ISC