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
8cd807c2d6
commit
a5fcdd03bf
@ -88,14 +88,17 @@ void YggdrasilStep::refresh()
|
||||
* "requestUser": true/false // request the user structure
|
||||
* }
|
||||
*/
|
||||
QJsonObject selectedProfile;
|
||||
selectedProfile.insert("id", m_data->profileId());
|
||||
selectedProfile.insert("name", m_data->profileName());
|
||||
|
||||
QJsonObject req;
|
||||
req.insert("clientToken", m_data->clientToken());
|
||||
req.insert("accessToken", m_data->accessToken());
|
||||
|
||||
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);
|
||||
|
||||
QJsonDocument doc(req);
|
||||
|
Loading…
Reference in New Issue
Block a user