After I entered the flawed password or e mail, the code did not throw the right exception error, comparable to ‘incorrect password’ or ‘non-existent e mail,’ however as an alternative, it threw a distinct exception.
that is my code for login ;
remaining _auth = FirebaseAuth.occasion;
Future<void> login() async {
strive {
await _auth.signInWithEmailAndPassword(
e mail: emailController.textual content,
password: passwordController.textual content,
);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SignUp_Screen(),
),
);
// The login was profitable, you may carry out any essential actions right here.
} catch (error, stackTrace) {
debugPrint(error.toString());
utils().toastMessage(error.toString());
}
}
Login button.
RoundButton(
title: "Login",
onTap: () {
if (_formKey.currentState!.validate()) {
login();
}
},
),
Restarted utility in 5,257ms.
flutter: [firebase_auth/INVALID_LOGIN_CREDENTIALS] Error Area=FIRAuthErrorDomain Code=17999 "An inner error has occurred, print and examine the error particulars for extra info." UserInfo={FIRAuthErrorUserInfoNameKey=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An inner error has occurred, print and examine the error particulars for extra info., NSUnderlyingError=0x600000e9e460 {Error
Area=FIRAuthInternalErrorDomain Code=3 “(null)” UserInfo={NSUnderlyingError=0x600000ea31e0 {Error Area=com.google.HTTPStatus Code=400 "(null)" UserInfo={information={size = 224, bytes = 0x7b0a2020 22657272 6f72223a 207b0a20 ... 5d0a2020 7d0a7d0a }, data_content_type=utility/json; charset=UTF-8}},
FIRAuthErrorUserInfoDeserializedResponseKey={
flutter: code = 400;
flutter: errors = (
flutter: {
flutter: area = world;
flutter: message = "INVALID_LOGIN_CREDENTIALS";
flutter: motive = invalid;
flutter: }
flutter: );
flutter: message = "INVALID_LOGIN_CREDENTIALS";
flutter: }}}}