I'm trying to setup Firebase Auth on my Next.JS app.
Firebase sign up using email and password works perfectly fine, but when I try to log in, I get this network-request-failed error in the console.
Here's my code for the login function,
const logIn = (email, password) =>{
signInWithEmailAndPassword(auth, email, password).then((data)=>{
router.push('/details')
}).catch((e)=>{
console.log(e)
});
}
Intitially I thought it was just an issue with the localhost, So I tried deploying it as a vercel app and tested. But still no success. Sign up works perfectly fine. The issue is just with the login.
Any suggestion on what I'm doing wrong?