mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 15:07:33 +08:00
redirect to login page when user logout without token
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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': '两步验证没有启用',
|
||||
|
||||
Reference in New Issue
Block a user