This commit is contained in:
Timur Ercan
2023-03-03 20:21:20 +01:00
parent f8d0936b13
commit 6c693eef11
2 changed files with 2 additions and 5 deletions

View File

@ -56,16 +56,14 @@ export default function Login() {
}
);
if (!res) {
setErrorMessage("error");
setErrorMessage("Error");
toast.dismiss();
toast.error("Something went wrong.");
}
// we're logged in! let's do a hard refresh to the desired url
else if (!res.error) {
// we're logged in, let's do a hard refresh to the original url
router.push(callbackUrl);
// toast.error("error");
}
// fallback if error not found
else {
toast.dismiss();
if (res.status == 401) {