Next-Auth Firebase Bug
Answered
New Zealand Heading Dog posted this in #help-forum

New Zealand Heading DogOP
im using the firebase adapter on next-auth, but when i provide the firestore db in the adapter, it says undefined
18 Replies

New Zealand Heading DogOP

Here

European sprat
I can't help you but I'd suggest showing some amount of code...

@European sprat I can't help you but I'd suggest showing some amount of code...

New Zealand Heading DogOP
ok.
just a sec
import NextAuth from "next-auth"
import GoogleProvider from "next-auth/providers/google"
import { FirebaseAdapter } from "@next-auth/firebase-adapter"
import { db } from "@/firebase.config"
export default NextAuth({
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET,
}),
],
secret:process.env.NEXT_AUTH_SECRET,
adapter: FirebaseAdapter(db)
})


European sprat
let's see @/firebase.config

New Zealand Heading DogOP
yeah


@European sprat let's see @/firebase.config

New Zealand Heading DogOP
this is the file

European sprat
Answer

New Zealand Heading DogOP
Hey
i found something..
my env variables are coming to be undefined

New Zealand Heading DogOP
{error: {…}, url: '/api/auth/providers', message:
Unexpected token '<', "<!DOCTYPE "... is not valid JSON
}
New Zealand Heading DogOP
i fixed it, it was version problem. followed the new version docs and it is done now 🙂 Thanks @European sprat for you help