This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// followed from next-auth repo: https://github.com/nextauthjs/next-auth | |
// create faunadb server key | |
// create collections: users, accounts, sessions, verificationRequests | |
// create required indexes | |
import faunadb, { query as q } from 'faunadb'; | |
import { v4 as uuidv4 } from 'uuid'; | |
import { createHash, randomBytes } from 'crypto'; |