Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
Can't import provider in firebase 9.1.3 with GoogleAuthProvider

I am trying to implement Firebase 9.1.3 in a Next.js application. It seems everything is fine, until the code reaches the provider and sends an error: "can't import provider" when I call Firebase from another component. This is the code I have used to create Firebase logic.

import { initializeApp, getApps, getApp } from 'firebase/app';
import { getFirestore } from 'firebase/firestore/lite';
import { getAuth, GoogleAuthProvider } from 'firebase/auth';

This are my imports in firebase.js

const app = !getApps().length ? initializeApp(firebaseConfig):getApp();


const db = getFirestore(app);
const auth = getAuth();
const provider = new GoogleAuthProvider();


export default { db, auth, provider };

The error appears in const provider = new GoogleAuthProvider(); when I try to import provider in my login page. Now I have noticed I cannot import auth, so I imagine I can't import db too.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!