fix log in issue when incorrect password entered

This commit is contained in:
2024-07-29 16:44:23 +02:00
parent 88ca9b3f3c
commit 679a2a1a6f
2 changed files with 8 additions and 1 deletions

View File

@@ -144,6 +144,7 @@ class _RegisterState extends State<Register> {
// }
}
} on AuthException catch (error) {
Navigator.of(context).pop();
loginError(error.message);
emailController.clear();
passwordController.clear();

View File

@@ -59,21 +59,27 @@ class _SignInState extends State<SignIn> {
"Authorization": "leatucczyixqwkqqdrhayiwzeofkltds"
},
);
//print(response.body[])
if (response.statusCode == 200) {
print(response.body);
var userSignedin = jsonDecode(response.body);
if (userSignedin["status"] == "OK") {
print("here");
setState(() {
successfulSignIn = true;
});
Navigator.of(context).pop();
} else {
Navigator.of(context).pop();
loginError();
passwordController.clear();
}
}
} on AuthException {
Navigator.of(context).pop();
loginError();
passwordController.clear();
}
Navigator.of(context).pop();
}
void loginError() {