mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-30 19:00:28 +08:00
Fixed cookies not being set for non-community domains after logging in
Also fixed secure flag not working for cookies
This commit is contained in:
parent
5928c3b76a
commit
71a3893636
3
index.js
3
index.js
@ -164,6 +164,8 @@ SteamCommunity.prototype.login = function(details, callback) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.setCookies(cookies);
|
||||||
|
|
||||||
callback(null, sessionID, cookies, steamguard, oAuth.oauth_token);
|
callback(null, sessionID, cookies, steamguard, oAuth.oauth_token);
|
||||||
}
|
}
|
||||||
@ -217,6 +219,7 @@ SteamCommunity.prototype.oAuthLogin = function(steamguard, token, callback) {
|
|||||||
|
|
||||||
SteamCommunity.prototype._setCookie = function(cookie, secure) {
|
SteamCommunity.prototype._setCookie = function(cookie, secure) {
|
||||||
var protocol = secure ? "https" : "http";
|
var protocol = secure ? "https" : "http";
|
||||||
|
cookie.secure = !!secure;
|
||||||
|
|
||||||
this._jar.setCookie(cookie.clone(), protocol + "://steamcommunity.com");
|
this._jar.setCookie(cookie.clone(), protocol + "://steamcommunity.com");
|
||||||
this._jar.setCookie(cookie.clone(), protocol + "://store.steampowered.com");
|
this._jar.setCookie(cookie.clone(), protocol + "://store.steampowered.com");
|
||||||
|
Loading…
Reference in New Issue
Block a user