mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-30 02:40:12 +08:00
Use a string for the steamguard value instead of an object
This commit is contained in:
parent
399cc5ee84
commit
88059596b3
7
index.js
7
index.js
@ -13,8 +13,9 @@ function SteamCommunity() {
|
||||
}
|
||||
|
||||
SteamCommunity.prototype.login = function(details, callback) {
|
||||
if(details.steamID && details.sentry) {
|
||||
this._jar.setCookie(Request.cookie('steamMachineAuth' + details.steamID.getSteamID64() + '=' + encodeURIComponent(details.sentry)), 'https://steamcommunity.com');
|
||||
if(details.steamguard) {
|
||||
var parts = details.steamguard.split('||');
|
||||
this._jar.setCookie(Request.cookie('steamMachineAuth' + parts[0] + '=' + encodeURIComponent(parts[1])), 'https://steamcommunity.com');
|
||||
}
|
||||
|
||||
var self = this;
|
||||
@ -80,7 +81,7 @@ SteamCommunity.prototype.login = function(details, callback) {
|
||||
for(var i = 0; i < cookies.length; i++) {
|
||||
var parts = cookies[i].split('=');
|
||||
if(parts[0] == 'steamMachineAuth' + self.steamID) {
|
||||
steamguard = {"steamID": self.steamID, "sentry": decodeURIComponent(parts[1])};
|
||||
steamguard = self.steamID.toString() + '||' + decodeURIComponent(parts[1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user