From eae65da110bb957194b34e0f3573ce4e6e6ddc78 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sun, 22 Aug 2021 20:01:18 +0200 Subject: GH-3392 Switch MS account login to use device flow instead Device flow involves the user manually opening a web page and putting in a code. We no longer need to interact with the browser. --- launcher/minecraft/auth/flows/AuthContext.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'launcher/minecraft/auth/flows/AuthContext.h') diff --git a/launcher/minecraft/auth/flows/AuthContext.h b/launcher/minecraft/auth/flows/AuthContext.h index 5f99dba3..1d9f8f72 100644 --- a/launcher/minecraft/auth/flows/AuthContext.h +++ b/launcher/minecraft/auth/flows/AuthContext.h @@ -36,8 +36,7 @@ private slots: // OAuth-specific callbacks void onOAuthLinkingSucceeded(); void onOAuthLinkingFailed(); - void onOpenBrowser(const QUrl &url); - void onCloseBrowser(); + void onOAuthActivityChanged(Katabasis::Activity activity); // Yggdrasil specific callbacks @@ -82,13 +81,16 @@ protected: bool m_xboxProfileSucceeded = false; bool m_mcAuthSucceeded = false; Katabasis::Activity m_activity = Katabasis::Activity::Idle; - enum class MSAStage { - Idle, + enum class AuthStage { + Initial, UserAuth, XboxAuth, MinecraftProfile, - Skin - } m_stage = MSAStage::Idle; + Skin, + Complete + } m_stage = AuthStage::Initial; + + void setStage(AuthStage stage); QNetworkAccessManager *mgr = nullptr; }; -- cgit