GH-3392 dirty initial MSA support that shares logic with Mojang flows
Both act as the first step of AuthContext.
This commit is contained in:
20
launcher/minecraft/auth/flows/MSAInteractive.cpp
Normal file
20
launcher/minecraft/auth/flows/MSAInteractive.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include "MSAInteractive.h"
|
||||
|
||||
MSAInteractive::MSAInteractive(AccountData* data, QObject* parent) : AuthContext(data, parent) {}
|
||||
|
||||
void MSAInteractive::executeTask() {
|
||||
m_requestsDone = 0;
|
||||
m_xboxProfileSucceeded = false;
|
||||
m_mcAuthSucceeded = false;
|
||||
|
||||
initMSA();
|
||||
|
||||
QVariantMap extraOpts;
|
||||
extraOpts["prompt"] = "select_account";
|
||||
m_oauth2->setExtraRequestParams(extraOpts);
|
||||
|
||||
beginActivity(Katabasis::Activity::LoggingIn);
|
||||
m_oauth2->unlink();
|
||||
*m_data = AccountData();
|
||||
m_oauth2->link();
|
||||
}
|
Reference in New Issue
Block a user