Next.js Discord

Discord Forum

Auth JS with firebase. Porject Id not found

Unanswered
Velvet ant posted this in #help-forum
Open in Discord
Velvet antOP
Hey I am getting this error while trying to login with the google provider : "https://next-auth.js.org/errors#adapter_error_getuserbyaccount Unable to detect a Project Id in the current environment."

Here is my typescript code for the nextjs auth route :


import NextAuth from "next-auth"; import GoogleProvider from "next-auth/providers/google"; import { FirestoreAdapter } from "@next-auth/firebase-adapter"; import { db } from "@/firebase.config"; import * as firestoreFunctions from 'firebase/firestore' const handler = NextAuth({ providers: [ GoogleProvider({ clientId: process.env.GG_CLIENT_ID, clientSecret: process.env.GG_CLIENT_SECRET, }), ], adapter: FirestoreAdapter({ db: db, ...firestoreFunctions }), }) export { handler as GET, handler as POST }

0 Replies