diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-08-27 22:35:17 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-08-27 22:35:17 +0200 |
commit | b2c1100b1c3a1eb64152eba7aafac6493b2f7ff0 (patch) | |
tree | b021f6227a1780009d886fe15c11ea715173e6dd /launcher/minecraft/auth/flows | |
parent | 34a5459dcef1adb7eb355bb0f940eb212173857f (diff) | |
download | PrismLauncher-b2c1100b1c3a1eb64152eba7aafac6493b2f7ff0.tar.gz PrismLauncher-b2c1100b1c3a1eb64152eba7aafac6493b2f7ff0.tar.bz2 PrismLauncher-b2c1100b1c3a1eb64152eba7aafac6493b2f7ff0.zip |
NOISSUE introduce the concept of secrets static library
Diffstat (limited to 'launcher/minecraft/auth/flows')
-rw-r--r-- | launcher/minecraft/auth/flows/AuthContext.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/launcher/minecraft/auth/flows/AuthContext.cpp b/launcher/minecraft/auth/flows/AuthContext.cpp index ed8acd40..9ae99453 100644 --- a/launcher/minecraft/auth/flows/AuthContext.cpp +++ b/launcher/minecraft/auth/flows/AuthContext.cpp @@ -17,7 +17,10 @@ #include "AuthContext.h" #include "katabasis/Globals.h" #include "katabasis/Requestor.h" -#include "BuildConfig.h" + +#ifdef EMBED_SECRETS +#include "Secrets.h" +#endif using OAuth2 = Katabasis::OAuth2; using Requestor = Katabasis::Requestor; @@ -49,12 +52,13 @@ void AuthContext::finishActivity() { } void AuthContext::initMSA() { +#ifdef EMBED_SECRETS if(m_oauth2) { return; } Katabasis::OAuth2::Options opts; opts.scope = "XboxLive.signin offline_access"; - opts.clientIdentifier = BuildConfig.MSA_CLIENT_ID; + opts.clientIdentifier = Secrets::getMSAClientID('-'); opts.authorizationUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode"; opts.accessTokenUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token"; opts.listenerPorts = {28562, 28563, 28564, 28565, 28566}; @@ -66,6 +70,7 @@ void AuthContext::initMSA() { connect(m_oauth2, &OAuth2::linkingSucceeded, this, &AuthContext::onOAuthLinkingSucceeded); connect(m_oauth2, &OAuth2::showVerificationUriAndCode, this, &AuthContext::showVerificationUriAndCode); connect(m_oauth2, &OAuth2::activityChanged, this, &AuthContext::onOAuthActivityChanged); +#endif } void AuthContext::initMojang() { |