aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth/flows/AuthContext.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2021-08-22 20:01:18 +0200
committerPetr Mrázek <peterix@gmail.com>2021-08-22 20:01:18 +0200
commiteae65da110bb957194b34e0f3573ce4e6e6ddc78 (patch)
tree425a9252338c3db5eac4a5018f594ab646f6cea6 /launcher/minecraft/auth/flows/AuthContext.h
parent50b92c1af2d28ab59a9b70ce0b3dca62bf1a7583 (diff)
downloadPrismLauncher-eae65da110bb957194b34e0f3573ce4e6e6ddc78.tar.gz
PrismLauncher-eae65da110bb957194b34e0f3573ce4e6e6ddc78.tar.bz2
PrismLauncher-eae65da110bb957194b34e0f3573ce4e6e6ddc78.zip
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.
Diffstat (limited to 'launcher/minecraft/auth/flows/AuthContext.h')
-rw-r--r--launcher/minecraft/auth/flows/AuthContext.h14
1 files changed, 8 insertions, 6 deletions
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;
};