Expire token after 1 hour
This commit is contained in:
@@ -27,7 +27,7 @@ export default function ForgotPassword() {
|
||||
}),
|
||||
{
|
||||
loading: "Sending...",
|
||||
success: `Reset link sent. `,
|
||||
success: "Reset link sent.",
|
||||
error: "Could not send reset link :/",
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user