fix: sliding token expiry and silent 401 redirect

This commit is contained in:
rustmailer
2026-06-26 18:29:18 +08:00
parent 8641bb4b56
commit cfb8172607
2 changed files with 16 additions and 14 deletions
-6
View File
@@ -42,12 +42,6 @@ const handleAxiosError = (error: any) => {
switch (error.response?.status) {
case 401:
toast({
variant: 'destructive',
title: i18n.t('auth.sessionExpired'),
description: i18n.t('auth.sessionExpiredDesc'),
action: <ToastAction altText={i18n.t('common.close')}>{i18n.t('common.close')}</ToastAction>,
});
resetToken();
const currentPath = router.history.location.pathname;
if (currentPath !== '/sign-in') {