Merge pull request #2828 from Trial97/cmake_fields

Allow configuring more URLs through CMake
This commit is contained in:
Alexandru Ionut Tripon
2024-09-17 08:44:24 +03:00
committed by GitHub
5 changed files with 20 additions and 8 deletions

View File

@@ -90,15 +90,16 @@ MSAStep::MSAStep(AccountData* data, bool silent) : AuthStep(data), m_silent(sile
{
auto replyHandler = new QOAuthHttpServerReplyHandler(this);
replyHandler->setCallbackText(R"XXX(
replyHandler->setCallbackText(QString(R"XXX(
<noscript>
<meta http-equiv="Refresh" content="0; URL=https://prismlauncher.org/successful-login" />
<meta http-equiv="Refresh" content="0; URL=%1" />
</noscript>
Login Successful, redirecting...
<script>
window.location.replace("https://prismlauncher.org/successful-login");
window.location.replace("%1");
</script>
)XXX");
)XXX")
.arg(BuildConfig.LOGIN_CALLBACK_URL));
oauth2.setReplyHandler(replyHandler);
} else {
oauth2.setReplyHandler(new CustomOAuthOobReplyHandler(this));