mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 21:25:04 +00:00
Login frontend complete
This commit is contained in:
@@ -121,11 +121,11 @@ exports.login = (req, res) => {
|
||||
return data.user.getIdToken();
|
||||
})
|
||||
.then((token) => {
|
||||
return res.json({ token });
|
||||
return res.status(200).json({ token });
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
if (err.code === "auth/wrong-password") {
|
||||
if (err.code === "auth/wrong-password" || err.code === "auth/invalid-email") {
|
||||
return res
|
||||
.status(403)
|
||||
.json({ general: "Invalid credentials. Please try again." });
|
||||
|
||||
Reference in New Issue
Block a user