Compare commits

...

4 Commits

Author SHA1 Message Date
Alexander Corn
911ae86379 3.1.1 2015-07-22 11:59:43 -04:00
Alexander Corn
a12e8cb67c Added 50-second HTTP timeout 2015-07-22 11:59:18 -04:00
Alexander Corn
edd95cc93f 3.1.0 2015-07-17 22:57:51 -04:00
Alexander Corn
4f1f265c4d Added support for app-based Steam Guard 2015-07-17 22:57:40 -04:00
2 changed files with 7 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ SteamCommunity.SteamID = SteamID;
function SteamCommunity() {
this._jar = Request.jar();
this._captchaGid = -1;
this.request = Request.defaults({"jar": this._jar});
this.request = Request.defaults({"jar": this._jar, "timeout": 50000});
this.chatState = SteamCommunity.ChatState.Offline;
// English
@@ -52,7 +52,7 @@ SteamCommunity.prototype.login = function(details, callback) {
"password": hex2b64(key.encrypt(details.password)),
"remember_login": "true",
"rsatimestamp": json.timestamp,
"twofactorcode": "",
"twofactorcode": details.twoFactorCode || "",
"username": details.accountName
};
@@ -66,10 +66,14 @@ SteamCommunity.prototype.login = function(details, callback) {
}
if(!body.success && body.emailauth_needed) {
// Steam Guard (email)
var error = new Error("SteamGuard");
error.emaildomain = body.emaildomain;
callback(error);
} else if(!body.success && body.requires_twofactor) {
// Steam Guard (app)
callback(new Error("SteamGuardMobile"));
} else if(!body.success && body.captcha_needed) {
var error = new Error("CAPTCHA");
error.captchaurl = "https://steamcommunity.com/public/captcha.php?gid=" + body.captcha_gid;

View File

@@ -1,6 +1,6 @@
{
"name": "steamcommunity",
"version": "3.0.0",
"version": "3.1.1",
"description": "Provides an interface for logging into and interacting with the Steam Community website",
"keywords": ["steam", "steam community"],
"homepage": "https://github.com/DoctorMcKay/node-steamcommunity",