Expire token after 1 hour

This commit is contained in:
Ephraim Atta-Duncan
2023-06-05 16:54:12 +00:00
parent 2b9a2ff250
commit 3a0648c85d
6 changed files with 25 additions and 23 deletions

View File

@@ -40,20 +40,8 @@ export default function ResetPassword(props: any) {
if (!response.ok) {
toast.dismiss();
if (response.status == 404) {
toast.error("Invalid Token");
}
if (response.status == 400) {
toast.error("New password must be different");
}
if (response.status == 500) {
toast.error("Something went wrong.");
}
return;
const error = await response.json();
toast.error(error.message);
}
if (response.ok) {