From 2ac89c237857ac38f72406f6e665f97e502b22f4 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Sun, 23 Jun 2024 01:49:37 +0300 Subject: [PATCH] add more states for account refresh fail Signed-off-by: Trial97 --- launcher/minecraft/auth/steps/MSAStep.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/launcher/minecraft/auth/steps/MSAStep.cpp b/launcher/minecraft/auth/steps/MSAStep.cpp index 665070bd3..3db04bf2f 100644 --- a/launcher/minecraft/auth/steps/MSAStep.cpp +++ b/launcher/minecraft/auth/steps/MSAStep.cpp @@ -122,7 +122,11 @@ MSAStep::MSAStep(AccountData* data, bool silent) : AuthStep(data), m_silent(sile connect(&oauth2, &QOAuth2AuthorizationCodeFlow::requestFailed, this, [this, silent](const QAbstractOAuth2::Error err) { auto state = AccountTaskState::STATE_FAILED_HARD; if (oauth2.status() == QAbstractOAuth::Status::Granted || silent) { - state = AccountTaskState::STATE_FAILED_SOFT; + if (err == QAbstractOAuth2::Error::NetworkError) { + state = AccountTaskState::STATE_OFFLINE; + } else { + state = AccountTaskState::STATE_FAILED_SOFT; + } } auto message = tr("Microsoft user authentication failed."); if (silent) {