omedinapr

Untitled

Aug 15th, 2023
1,230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import NextAuth from "next-auth";
  2. import { FirestoreAdapter } from "@auth/firebase-adapter";
  3. import { firestore } from "lib/firestore";
  4. import { initFirestore } from "@auth/firebase-adapter";
  5. import { cert } from "firebase-admin/app";
  6.  
  7. export const firestore = initFirestore({
  8.   credential: cert({
  9.     projectId: process.env.FIREBASE_PROJECT_ID,
  10.     clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
  11.     privateKey: process.env.FIREBASE_PRIVATE_KEY,
  12.   }),
  13. });
  14.  
  15. export default NextAuth({
  16.   adapter: FirestoreAdapter(firestore),
  17. });
Advertisement
Add Comment
Please, Sign In to add comment