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

150
Views
no sé cómo iniciar sesión con google y facebook en firebase

Quería iniciar sesión usando las cuentas de Facebook y Google, este es mi código:

 import { initializeApp } from "https://www.gstatic.com/firebasejs/9.0.2/firebase-app.js"; import { getAuth, createUserWithEmailAndPassword, signOut, signInWithEmailAndPassword, onAuthStateChanged, GoogleAuthProvider, signInWithPopup } from "https://www.gstatic.com/firebasejs/9.0.2/firebase-auth.js"; const app = initializeApp(firebaseConfig); const auth = getAuth(app); // login with google const provider = new GoogleAuthProvider(); const signInWithGoogle = document.querySelector('#google-icon'); signInWithGoogle.addEventListener('click', (e) => { e.preventDefault(); signInWithPopup(auth, provider).then((result) => { const user = result.user; const credential = GoogleAuthProvider.credentialFromResult(result); const accessToken = credential.accessToken; }) .catch((error) => { const errorCode = error.code; const errorMessage = error.message; const email = error.email; const credential = GoogleAuthProvider.credentialFromError(error); }); });

pero sigo recibiendo este mensaje de error:

Información: el dominio actual no está autorizado para operaciones de OAuth. Esto evitará que signInWithPopup, signInWithRedirect, linkWithPopup y linkWithRedirect funcionen. Agregue su dominio (127.0.0.1) a la lista de dominios de redirección de OAuth en Firebase console -> sección Auth -> pestaña Método de inicio de sesión.

¿Puedes ayudarme por favor?

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!