redirect to login page when user logout without token

This commit is contained in:
MaysWind
2023-04-16 02:00:59 +08:00
parent 221a7809b6
commit a96eb31dc9
6 changed files with 9 additions and 1 deletions
+1
View File
@@ -47,6 +47,7 @@ axios.interceptors.response.use(response => {
|| errorCode === 202004 // current token type is invalid
|| errorCode === 202005 // current token requires two factor authorization
|| errorCode === 202006 // current token does not require two factor authorization
|| errorCode === 202012 // token is empty
) {
userState.clearTokenAndUserInfo(false);
location.reload();
+1
View File
@@ -547,6 +547,7 @@ export default {
'user token id is invalid': 'User token ID is invalid',
'token is not found': 'Token is not found',
'token is expired': 'Token is expired',
'token is empty': 'Token is empty',
'passcode is invalid': 'Passcode is invalid',
'two factor backup code is invalid': 'Two factor backup code is invalid',
'two factor is not enabled': 'Two factor is not enabled',
+1
View File
@@ -547,6 +547,7 @@ export default {
'user token id is invalid': '用户认证令牌ID无效',
'token is not found': '认证令牌不存在',
'token is expired': '认证令牌已过期',
'token is empty': '认证令牌为空',
'passcode is invalid': '验证码无效',
'two factor backup code is invalid': '两步验证备用码无效',
'two factor is not enabled': '两步验证没有启用',