mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-04-01 13:10:10 +08:00
Change default value for disableMobile to true
This commit is contained in:
parent
3bcaf40850
commit
be528d1a19
8
index.js
8
index.js
@ -65,7 +65,7 @@ SteamCommunity.prototype.login = function(details, callback) {
|
||||
this._setCookie(Request.cookie('steamMachineAuth' + parts[0] + '=' + encodeURIComponent(parts[1])), true);
|
||||
}
|
||||
|
||||
var disableMobile = details.disableMobile;
|
||||
var disableMobile = typeof details.disableMobile == 'undefined' ? true : details.disableMobile;
|
||||
|
||||
var self = this;
|
||||
|
||||
@ -161,18 +161,16 @@ SteamCommunity.prototype.login = function(details, callback) {
|
||||
callback(error);
|
||||
} else if (!body.success) {
|
||||
callback(new Error(body.message || "Unknown error"));
|
||||
} else if (!disableMobile && !body.oauth) {
|
||||
callback(new Error("Malformed response"));
|
||||
} else {
|
||||
var sessionID = generateSessionID();
|
||||
var oAuth;
|
||||
var oAuth = {};
|
||||
self._setCookie(Request.cookie('sessionid=' + sessionID));
|
||||
|
||||
var cookies = self._jar.getCookieString("https://steamcommunity.com").split(';').map(function(cookie) {
|
||||
return cookie.trim();
|
||||
});
|
||||
|
||||
if (!disableMobile){
|
||||
if (!disableMobile && body.oauth) {
|
||||
oAuth = JSON.parse(body.oauth);
|
||||
self.steamID = new SteamID(oAuth.steamid);
|
||||
self.oAuthToken = oAuth.oauth_token;
|
||||
|
Loading…
Reference in New Issue
Block a user