Only send selectedProfile when selecting a profile
Some authentication servers (Blessing Skin) care when selectedProfile is sent on POST /refresh but the clientToken is already bound to a profile. We should only include selectedProfile in POST /refresh during the initial "Add authlib-injector account" process when selecting a profile from multiple availableProfiles. For https://github.com/unmojang/FjordLauncher/issues/50
This commit is contained in:
parent
f66c5b116f
commit
b1e0b70833
@ -88,14 +88,17 @@ void YggdrasilStep::refresh()
|
|||||||
* "requestUser": true/false // request the user structure
|
* "requestUser": true/false // request the user structure
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
QJsonObject selectedProfile;
|
|
||||||
selectedProfile.insert("id", m_data->profileId());
|
|
||||||
selectedProfile.insert("name", m_data->profileName());
|
|
||||||
|
|
||||||
QJsonObject req;
|
QJsonObject req;
|
||||||
req.insert("clientToken", m_data->clientToken());
|
req.insert("clientToken", m_data->clientToken());
|
||||||
req.insert("accessToken", m_data->accessToken());
|
req.insert("accessToken", m_data->accessToken());
|
||||||
req.insert("selectedProfile", selectedProfile);
|
|
||||||
|
if (m_didSelectProfile) {
|
||||||
|
QJsonObject selectedProfile;
|
||||||
|
selectedProfile.insert("id", m_data->profileId());
|
||||||
|
selectedProfile.insert("name", m_data->profileName());
|
||||||
|
req.insert("selectedProfile", selectedProfile);
|
||||||
|
}
|
||||||
req.insert("requestUser", false);
|
req.insert("requestUser", false);
|
||||||
|
|
||||||
QJsonDocument doc(req);
|
QJsonDocument doc(req);
|
||||||
|
Loading…
Reference in New Issue
Block a user