You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using the latest version of @next-auth/firebase-adapter (1.0.2) is producing an error:
export const authOptions = {
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
})
],
adapter: FirebaseAdapter({ db, ...firestoreFunctions }),
}
...
export default NextAuth(authOptions);
and the error is:
error - (api)/pages/api/auth/[...nextauth].js (43:27) @ eval
error - TypeError: (0 , next_auth_firebase_adapter__WEBPACK_IMPORTED_MODULE_6_.FirebaseAdapter) is not a function
at eval (webpack-internal:///(api)/./pages/api/auth/[...nextauth].js:64:90)
going back to the @experimental version, works. but I want to use the latest, of course.
How to reproduce
normal nextjs installation.
[...nextauth].js in the normal place, /pages/api/auth
separate file for all firebase stuff (firebase.config.ts), ending with :
in [...nextauth].js you can see:
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
}),
// ... add more providers here
],
adapter: FirebaseAdapter({ db, ...firestoreFunctions }),
...
Expected behavior
should show the google login button, and when logged in, to store the user's info in firebase.
instead i'm getting the error about FirebaseAdaptor being 'not a function'. which is weird, because i checked the code, and it definitely is...
The text was updated successfully, but these errors were encountered:
RonAlmog
added
the
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
label
Oct 24, 2022
Environment
next, react, next-auth, @next-auth/firebase-adapter
Reproduction URL
nope
Describe the issue
using the latest version of @next-auth/firebase-adapter (1.0.2) is producing an error:
export const authOptions = {
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
})
],
adapter: FirebaseAdapter({ db, ...firestoreFunctions }),
}
...
export default NextAuth(authOptions);
and the error is:
error - (api)/pages/api/auth/[...nextauth].js (43:27) @ eval
error - TypeError: (0 , next_auth_firebase_adapter__WEBPACK_IMPORTED_MODULE_6_.FirebaseAdapter) is not a function
at eval (webpack-internal:///(api)/./pages/api/auth/[...nextauth].js:64:90)
going back to the @experimental version, works. but I want to use the latest, of course.
How to reproduce
normal nextjs installation.
[...nextauth].js in the normal place, /pages/api/auth
separate file for all firebase stuff (firebase.config.ts), ending with :
const app = getApps.length > 0 ? getApp() : initializeApp(firebaseConfig);
const db = getFirestore(app);
const storage = getStorage(app);
export { app, db, storage };
in [...nextauth].js you can see:
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
}),
// ... add more providers here
],
adapter: FirebaseAdapter({ db, ...firestoreFunctions }),
...
Expected behavior
should show the google login button, and when logged in, to store the user's info in firebase.
instead i'm getting the error about FirebaseAdaptor being 'not a function'. which is weird, because i checked the code, and it definitely is...
The text was updated successfully, but these errors were encountered: