Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

219
Vistas
firebase signInWithEmailLink method not working properly

I installed firebase to my react app using npm install firebase command and initialized firebase like this

// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getAuth, GoogleAuthProvider } from "firebase/auth"
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries

// Your web app's Firebase configuration
const firebaseConfig = {.........};

// Initialize Firebase
const app = initializeApp(firebaseConfig);

// export
export const auth = getAuth(app);
export const googleAuthProvider = new GoogleAuthProvider();

and i want to signInWithEmailLink method like this

import { signInWithEmailLink } from "firebase/auth";

const [email, setEmail] = useState("");
const [password, setPassword] = useState("");

useEffect(() => {
    setEmail(window.localStorage.getItem('emailForRegistration'));
    console.log(window.location.href);
    console.log(window.localStorage.getItem("emailForRegistration"));

}, []);

const handleSubmit = async (e) => {
e.preventDefault();

try {
    const result = await signInWithEmailLink(
        email,
        window.location.href
    );
    console.log("Result", result);
} catch (error) {
    console.log(error);
}
};

and it give me this error

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Don't use the useEffect() hook. Follow the instructions from the firebase docs here.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda