mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-07 16:10:11 +08:00
Require steamguard value in oAuthLogin method
This commit is contained in:
parent
c246011fe2
commit
0c4e026701
12
index.js
12
index.js
@ -170,10 +170,9 @@ SteamCommunity.prototype.login = function(details, callback) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SteamCommunity.prototype.oAuthLogin = function(steamID, token, callback) {
|
SteamCommunity.prototype.oAuthLogin = function(steamguard, token, callback) {
|
||||||
if(typeof steamID !== 'object') {
|
steamguard = steamguard.split('||');
|
||||||
steamID = new SteamID(steamID);
|
var steamID = new SteamID(steamguard[0]);
|
||||||
}
|
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
this.request.post({
|
this.request.post({
|
||||||
@ -193,8 +192,9 @@ SteamCommunity.prototype.oAuthLogin = function(steamID, token, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var cookies = [
|
var cookies = [
|
||||||
'steamLogin=' + steamID.getSteamID64() + '||' + body.response.token,
|
'steamLogin=' + encodeURIComponent(steamID.getSteamID64() + '||' + body.response.token),
|
||||||
'steamLoginSecure=' + steamID.getSteamID64() + '||' + body.response.token_secure,
|
'steamLoginSecure=' + encodeURIComponent(steamID.getSteamID64() + '||' + body.response.token_secure),
|
||||||
|
'steamMachineAuth' + steamID.getSteamID64() + '=' + steamguard[1],
|
||||||
'sessionid=' + self.getSessionID()
|
'sessionid=' + self.getSessionID()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user