feat(accounts): save client id in MSAStep
This commit is contained in:
parent
9c71f364d2
commit
14717396eb
@ -12,9 +12,10 @@ using OAuth2 = Katabasis::DeviceFlow;
|
|||||||
using Activity = Katabasis::Activity;
|
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) {
|
||||||
|
m_clientId = APPLICATION->getMSAClientID();
|
||||||
OAuth2::Options opts;
|
OAuth2::Options opts;
|
||||||
opts.scope = "XboxLive.signin offline_access";
|
opts.scope = "XboxLive.signin offline_access";
|
||||||
opts.clientIdentifier = APPLICATION->getMSAClientID();
|
opts.clientIdentifier = m_clientId;
|
||||||
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";
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ void MSAStep::perform() {
|
|||||||
m_oauth2->setExtraRequestParams(extraOpts);
|
m_oauth2->setExtraRequestParams(extraOpts);
|
||||||
|
|
||||||
*m_data = AccountData();
|
*m_data = AccountData();
|
||||||
|
m_data->msaClientID = m_clientId;
|
||||||
m_oauth2->login();
|
m_oauth2->login();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -29,4 +29,5 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Katabasis::DeviceFlow *m_oauth2 = nullptr;
|
Katabasis::DeviceFlow *m_oauth2 = nullptr;
|
||||||
Action m_action;
|
Action m_action;
|
||||||
|
QString m_clientId;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user