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();