instalé firebase en la aplicación de reacción e inicialicé así
// 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();e importé este archivo en mi componente de reacción como este
import {auth} from '../../firebase';y trato de usarlo así
await auth.sendSignInLinkToEmail(email, config);y me da este error
En Firebase v9+, debe usar el método modular sendSignInLinkToEmail() :
import { auth } from '../../firebase'; import { sendSignInLinkToEmail } from "firebase/auth" await sendSignInLinkToEmail(auth, email, config);Puede detectar estos errores si se familiariza con el proceso de actualización de SDK con espacio de nombres a SDK modular .