aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2021-09-05 18:23:49 +0200
committerPetr Mrázek <peterix@gmail.com>2021-09-05 18:23:49 +0200
commit878c4fb8103bc866e5368fbb7287e94cca190dff (patch)
treefc8c0017d52af80bed159455f28c01f6a0dff648 /launcher/minecraft/auth
parentd644fb2094f623e45bff237ede7d432121f72072 (diff)
downloadPrismLauncher-878c4fb8103bc866e5368fbb7287e94cca190dff.tar.gz
PrismLauncher-878c4fb8103bc866e5368fbb7287e94cca190dff.tar.bz2
PrismLauncher-878c4fb8103bc866e5368fbb7287e94cca190dff.zip
NOISSUE Provide dummy implementation for the secrets library
Diffstat (limited to 'launcher/minecraft/auth')
-rw-r--r--launcher/minecraft/auth/flows/AuthContext.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/launcher/minecraft/auth/flows/AuthContext.cpp b/launcher/minecraft/auth/flows/AuthContext.cpp
index 776f45fe..b4db6c2d 100644
--- a/launcher/minecraft/auth/flows/AuthContext.cpp
+++ b/launcher/minecraft/auth/flows/AuthContext.cpp
@@ -18,9 +18,7 @@
#include "katabasis/Globals.h"
#include "AuthRequest.h"
-#ifdef EMBED_SECRETS
#include "Secrets.h"
-#endif
#include "Env.h"
@@ -53,13 +51,18 @@ void AuthContext::finishActivity() {
}
void AuthContext::initMSA() {
-#ifdef EMBED_SECRETS
if(m_oauth2) {
return;
}
+
+ auto clientId = Secrets::getMSAClientID('-');
+ if(clientId.isEmpty()) {
+ return;
+ }
+
Katabasis::OAuth2::Options opts;
opts.scope = "XboxLive.signin offline_access";
- opts.clientIdentifier = Secrets::getMSAClientID('-');
+ opts.clientIdentifier = clientId;
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};
@@ -71,7 +74,6 @@ 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() {