Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #79 from srabouin/master
Browse files Browse the repository at this point in the history
Use HTTPS and add missing steamLoginSecure cookie in webLogOn
  • Loading branch information
seishun committed Sep 26, 2014
2 parents 26a4b04 + 806a176 commit 9bb1a39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/handlers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ prototype.webLogOn = function(callback) {

var self = this;

var req = require('http').request(options, function(res) {
var req = require('https').request(options, function(res) {
if (res.statusCode == 200) {
res.on('readable', function() {
var response = JSON.parse(res.read());
callback([
'sessionid=' + self._webSessionID,
'steamLogin=' + JSON.parse(res.read()).authenticateuser.token
'steamLogin=' + response.authenticateuser.token,
'steamLoginSecure=' + response.authenticateuser.tokensecure
]);
});
} else {
Expand Down

0 comments on commit 9bb1a39

Please sign in to comment.