Fix 2FA dialog not opening & notifications table

This commit is contained in:
Natsumi
2024-10-11 16:06:16 +13:00
parent d45a2607e7
commit e0f7d54ab5
2 changed files with 12 additions and 1 deletions

View File

@@ -488,6 +488,17 @@ speechSynthesis.getVoices();
this.$emit('AUTOLOGIN');
throw new Error('401: Missing Credentials');
}
if (
status === 401 &&
data.error.message === '"Unauthorized"' &&
endpoint !== 'auth/user'
) {
// trigger 2FA dialog
if (!$app.twoFactorAuthDialogVisible) {
$app.API.getCurrentUser();
}
throw new Error('401: Unauthorized');
}
if (status === 403 && endpoint.substring(0, 6) === 'config') {
$app.$alert(
'VRChat currently blocks most VPNs. Please disable any connected VPNs and try again.',