Skip to content

Commit

Permalink
fix(frontend):handle invalid security answer (#29)
Browse files Browse the repository at this point in the history
* fix(frontend):handle invalid security answer
  • Loading branch information
Dami-18 authored Jul 16, 2024
1 parent 7938d1e commit 5bcc22f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/components/SecurityQueForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ const SecurityQueForm: React.FC = () => {
return;
}
if (res.status == 401)
if (resData.message == "Invalid Password" || resData.message == "Session isn't alive. PLease login again.")
if (resData.message == "Invalid Password")
return setAuth((prev) => ({ ...prev, currentStep: 0 }));
else if(resData.message == "Invalid Security Question Answer")
return

if (res.status == 500) throw new Error(resData.message);

Expand Down

0 comments on commit 5bcc22f

Please sign in to comment.