Jump to content
McKay Development

Can't make a simple login due to SteamGuardMobile


Ferdi342

Recommended Posts

Hello, i'm trying to do a simple login method using steam-community. The bot has 2FA enabled with a mobile device.

 

I use the following code:

var SteamCommunity = require('steamcommunity');
var steam = new SteamCommunity();
var SteamTotp = require('steam-totp');

var logOnOptions = {
	accountName: "accUsername",
	password: "accPassword",
	twoFactorCode: SteamTotp.generateAuthCode("mySharedSecret")
};

steam.login(logOnOptions, function(err, sessionID, cookies, steamguard){
	
	if (err) {
		console.log("There was an error logging in! Error details: " + err.message);
		process.exit(1); //terminates program
	} else {
		console.log("Successfully logged in as " + logOnOptions.accountName);
		steam.chatLogon();
		manager.setCookies(cookies, function(err) {
			if (err) {
				console.log(err);
				process.exit(1);
			}
		});
	}
	
	});

Well the problem is that when i'm trying to login with this code, console returns me Error: SteamGuardMobile, and as the documentation says this error means If your login failed due to Steam Guard and the user has app-based authentication enabled, the message property will be SteamGuardMobile. Login again and provide the app code as twoFactorCode to the details object.

 

But the funny fact is I'm using the twoFactorCode on the details object, and my sharedsecret is correct.

 

Why I'm having this issue?

 

Thanks a lot :D

Link to comment
Share on other sites

Guest akagna

Edit: Its working.

 

Hello, i'm trying to do a simple login method using steam-community. The bot has 2FA enabled with a mobile device.

 

I use the following code:

var SteamCommunity = require('steamcommunity');
var steam = new SteamCommunity();
var SteamTotp = require('steam-totp');

var logOnOptions = {
	accountName: "accUsername",
	password: "accPassword",
	twoFactorCode: SteamTotp.generateAuthCode("mySharedSecret")
};

steam.login(logOnOptions, function(err, sessionID, cookies, steamguard){
	
	if (err) {
		console.log("There was an error logging in! Error details: " + err.message);
		process.exit(1); //terminates program
	} else {
		console.log("Successfully logged in as " + logOnOptions.accountName);
		steam.chatLogon();
		manager.setCookies(cookies, function(err) {
			if (err) {
				console.log(err);
				process.exit(1);
			}
		});
	}
	
	});

Well the problem is that when i'm trying to login with this code, console returns me Error: SteamGuardMobile, and as the documentation says this error means If your login failed due to Steam Guard and the user has app-based authentication enabled, the message property will be SteamGuardMobile. Login again and provide the app code as twoFactorCode to the details object.

 

But the funny fact is I'm using the twoFactorCode on the details object, and my sharedsecret is correct.

 

Why I'm having this issue?

 

Thanks a lot :D

 

Helloo i found the problem my friend. Steam Guard is for email logins you have to change like that. I was have same problem.

steam.login(logOnOptions, function(err, sessionID, cookies, SteamGuardMobile){
Edited by akagna
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...