mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-03-14 15:00:07 +08:00
Fixed login issue caused by differing tokens on different domains
This commit is contained in:
parent
90eb4d38eb
commit
7cee24199f
10
index.js
10
index.js
@ -154,9 +154,13 @@ SteamCommunity.prototype._setCookie = function(cookie, secure) {
|
||||
var protocol = secure ? "https" : "http";
|
||||
cookie.secure = !!secure;
|
||||
|
||||
this._jar.setCookie(cookie.clone(), protocol + "://steamcommunity.com");
|
||||
this._jar.setCookie(cookie.clone(), protocol + "://store.steampowered.com");
|
||||
this._jar.setCookie(cookie.clone(), protocol + "://help.steampowered.com");
|
||||
if (cookie.domain) {
|
||||
this._jar.setCookie(cookie.clone(), protocol + '://' + cookie.domain);
|
||||
} else {
|
||||
this._jar.setCookie(cookie.clone(), protocol + "://steamcommunity.com");
|
||||
this._jar.setCookie(cookie.clone(), protocol + "://store.steampowered.com");
|
||||
this._jar.setCookie(cookie.clone(), protocol + "://help.steampowered.com");
|
||||
}
|
||||
};
|
||||
|
||||
SteamCommunity.prototype.setCookies = function(cookies) {
|
||||
|
@ -33,7 +33,7 @@
|
||||
"cheerio": "0.22.0",
|
||||
"image-size": "^0.8.2",
|
||||
"request": "^2.88.0",
|
||||
"steam-session": "^1.6.0",
|
||||
"steam-session": "^1.7.2",
|
||||
"steam-totp": "^1.5.0",
|
||||
"steamid": "^1.1.3",
|
||||
"xml2js": "^0.6.2"
|
||||
|
Loading…
Reference in New Issue
Block a user