Minor tweaks

This commit is contained in:
Alex Corn
2017-12-26 16:39:23 -05:00
parent b5f50a6614
commit 0b57b47ecb

View File

@@ -82,6 +82,8 @@ SteamCommunity.prototype.login = function(details, callback) {
this._setCookie(Request.cookie("mobileClientVersion=0 (2.1.3)"));
this._setCookie(Request.cookie("mobileClient=android"));
} else {
mobileHeaders = {"Referer": "https://steamcommunity.com/login"};
}
this.httpRequestPost("https://steamcommunity.com/login/getrsakey/", {
@@ -115,13 +117,14 @@ SteamCommunity.prototype.login = function(details, callback) {
"rsatimestamp": body.timestamp,
"twofactorcode": details.twoFactorCode || "",
"username": details.accountName,
"loginfriendlyname": "#login_emailauth_friendlyname_mobile",
"loginfriendlyname": "",
"donotcache": Date.now()
};
if(!disableMobile){
formObj.oauth_client_id = "DE45CD61";
formObj.oauth_scope = "read_profile write_profile read_client write_client";
formObj.loginfriendlyname = "#login_emailauth_friendlyname_mobile";
}
self.httpRequestPost({
@@ -159,7 +162,8 @@ SteamCommunity.prototype.login = function(details, callback) {
} else if (!disableMobile && !body.oauth) {
callback(new Error("Malformed response"));
} else {
var sessionID = generateSessionID(), oAuth;
var sessionID = generateSessionID();
var oAuth;
self._setCookie(Request.cookie('sessionid=' + sessionID));
var cookies = self._jar.getCookieString("https://steamcommunity.com").split(';').map(function(cookie) {