parent
bb02226870
commit
0854e83ce4
@ -1519,3 +1519,13 @@ QString Application::getJarsPath()
|
|||||||
}
|
}
|
||||||
return m_jarsPath;
|
return m_jarsPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Application::getMSAClientID()
|
||||||
|
{
|
||||||
|
QString clientIDOverride = m_settings->get("MSAClientIDOverride").toString();
|
||||||
|
if (!clientIDOverride.isEmpty()) {
|
||||||
|
return clientIDOverride;
|
||||||
|
}
|
||||||
|
|
||||||
|
return BuildConfig.MSA_CLIENT_ID;
|
||||||
|
}
|
||||||
|
@ -117,6 +117,8 @@ public:
|
|||||||
|
|
||||||
QString getJarsPath();
|
QString getJarsPath();
|
||||||
|
|
||||||
|
QString getMSAClientID();
|
||||||
|
|
||||||
/// this is the root of the 'installation'. Used for automatic updates
|
/// this is the root of the 'installation'. Used for automatic updates
|
||||||
const QString &root() {
|
const QString &root() {
|
||||||
return m_rootPath;
|
return m_rootPath;
|
||||||
|
@ -14,7 +14,7 @@ using Activity = Katabasis::Activity;
|
|||||||
MSAStep::MSAStep(AccountData* data, Action action) : AuthStep(data), m_action(action) {
|
MSAStep::MSAStep(AccountData* data, Action action) : AuthStep(data), m_action(action) {
|
||||||
OAuth2::Options opts;
|
OAuth2::Options opts;
|
||||||
opts.scope = "XboxLive.signin offline_access";
|
opts.scope = "XboxLive.signin offline_access";
|
||||||
opts.clientIdentifier = BuildConfig.MSA_CLIENT_ID;
|
opts.clientIdentifier = APPLICATION->getMSAClientID();
|
||||||
opts.authorizationUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode";
|
opts.authorizationUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode";
|
||||||
opts.accessTokenUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";
|
opts.accessTokenUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ AccountListPage::AccountListPage(QWidget *parent)
|
|||||||
updateButtonStates();
|
updateButtonStates();
|
||||||
|
|
||||||
// Xbox authentication won't work without a client identifier, so disable the button if it is missing
|
// Xbox authentication won't work without a client identifier, so disable the button if it is missing
|
||||||
ui->actionAddMicrosoft->setVisible(BuildConfig.MSA_CLIENT_ID.size() != 0);
|
ui->actionAddMicrosoft->setVisible(!APPLICATION->getMSAClientID().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountListPage::~AccountListPage()
|
AccountListPage::~AccountListPage()
|
||||||
|
Loading…
Reference in New Issue
Block a user