aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-02-18 12:27:34 +0100
committerSefa Eyeoglu <contact@scrumplex.net>2022-02-18 12:32:24 +0100
commit14717396eb9be5f14b23a1af50e1379e66cfaf3c (patch)
tree59fb4138d9efc7c2f35ffc529987d1f46239e109 /launcher/minecraft/auth
parent9c71f364d25df5a992c7067ecfca2e095abcc20f (diff)
downloadPrismLauncher-14717396eb9be5f14b23a1af50e1379e66cfaf3c.tar.gz
PrismLauncher-14717396eb9be5f14b23a1af50e1379e66cfaf3c.tar.bz2
PrismLauncher-14717396eb9be5f14b23a1af50e1379e66cfaf3c.zip
feat(accounts): save client id in MSAStep
Diffstat (limited to 'launcher/minecraft/auth')
-rw-r--r--launcher/minecraft/auth/steps/MSAStep.cpp4
-rw-r--r--launcher/minecraft/auth/steps/MSAStep.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/launcher/minecraft/auth/steps/MSAStep.cpp b/launcher/minecraft/auth/steps/MSAStep.cpp
index 779aee43..7d28c2c8 100644
--- a/launcher/minecraft/auth/steps/MSAStep.cpp
+++ b/launcher/minecraft/auth/steps/MSAStep.cpp
@@ -12,9 +12,10 @@ using OAuth2 = Katabasis::DeviceFlow;
using Activity = Katabasis::Activity;
MSAStep::MSAStep(AccountData* data, Action action) : AuthStep(data), m_action(action) {
+ m_clientId = APPLICATION->getMSAClientID();
OAuth2::Options opts;
opts.scope = "XboxLive.signin offline_access";
- opts.clientIdentifier = APPLICATION->getMSAClientID();
+ opts.clientIdentifier = m_clientId;
opts.authorizationUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode";
opts.accessTokenUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";
@@ -57,6 +58,7 @@ void MSAStep::perform() {
m_oauth2->setExtraRequestParams(extraOpts);
*m_data = AccountData();
+ m_data->msaClientID = m_clientId;
m_oauth2->login();
return;
}
diff --git a/launcher/minecraft/auth/steps/MSAStep.h b/launcher/minecraft/auth/steps/MSAStep.h
index 49ba3542..301e1465 100644
--- a/launcher/minecraft/auth/steps/MSAStep.h
+++ b/launcher/minecraft/auth/steps/MSAStep.h
@@ -29,4 +29,5 @@ private slots:
private:
Katabasis::DeviceFlow *m_oauth2 = nullptr;
Action m_action;
+ QString m_clientId;
};