I am trying to sign in using firebase on flutter web which already works on android but anytime I try it on the web I get the below logged error.
[log] internal-error =====> {"error":{"code":400,"messag…dentitytoolkit.googleapis.com"}}]}} =======> null
and my sign in code below
Future<Either<AuthFailure, Unit>> signInWithEmailAndPassword({
required String emailAddress,
required String password,
}) async {
try {
await _firebaseAuth.signInWithEmailAndPassword(
email: emailAddress,
password: password,
);
return right(unit);
} on FirebaseAuthException catch (e) {
if (e.code == 'ERROR_WRONG_PASSWORD' ||
e.code == 'ERROR_USER_NOT_FOUND') {
return left(const AuthFailure.invalidEmailAndPasswordCombination());
} else {
log('${e.code} =====> ${e.message} =======> ${e.stackTrace}');
return left(const AuthFailure.serverError());
}
}
}
