1
0

fix(auth): log user out when the current account does not exist

This commit is contained in:
kolaente 2024-07-02 12:27:19 +02:00
parent 7a290116e8
commit 10bad95440
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -307,7 +307,7 @@ export const useAuthStore = defineStore('auth', () => {
return newUser return newUser
} catch (e) { } catch (e) {
if(e?.response?.status === 401 || if((e?.response?.status >= 400 && e?.response?.status < 500) ||
e?.response?.data?.message === 'missing, malformed, expired or otherwise invalid token provided') { e?.response?.data?.message === 'missing, malformed, expired or otherwise invalid token provided') {
await logout() await logout()
return return