Jump to content
McKay Development

One time login


Trajko

Recommended Posts

Hi, I want to make website where I can add my bots from input on site. What is best way to do it? I was thinking something like this:

app.post('submit1', (reqres=> {
    var namePass = req.body;    
    Test.logOn(namePass);
    Test.on('steamGuard'function(domaincallback) {
        res.send('User name and password are correct, ask for mobile auth')
    });
});
 
Then website will ask for code. And when i enter it, i recive it like this:
app.post('submit2', (reqres=> {
    var namePassGuard = req.body;
    new SteamBot(namePassGuard);
});
 
And then i can add in SteamBot constructor something like "when loginKey, save it in db"... So that way i will need to enter code only one time...
 
Am I doing it correct?
 
or something like this
 
app.post('submit2', (reqres=> {
    var namePassGuard = req.body;
    Test.logOn(namePassGuard);
    Test.on('steamGuard'function(domaincallback) {
        res.send('invalid mobile guard');
    });
    Test.on('loginKey', (key=>{
        something like this:
        db.save(namePassGuard, key);
        new SteamBot(db.this.username.and.key);
        res.send("login succes")
        
    });
 
});
 
var Test is new SteamUser()
 
Edited by Trajko
Link to comment
Share on other sites

Thanks for the reply!

I will fix that part. I have few more questions... What is the best way to enter 2FA only one time and keep bots logged in? Is this from "submit2" enough? Should I log off from "Test1" before I log in with "Test2"? Should I log off from "Test2" before I log in with the new SteamBot() constructor? Will all bots log off if I change the password on one acc? What is the best way to keep multiple bots active, so that if one acc got logged off, the rest stay logged in? Should I use new SteamBot() constructor or is there a better way? How can I manage proxies if I enter more than 10acc (i read you said that there should be only 10acc per IP address) so that every 10 acc from input on the website gets a new proxy or? I read the entire documentation a few times, this is everything I need to finish.

I would really appreciate it if you can help me.

Edited by Trajko
Link to comment
Share on other sites

I did this for login part

 
const Test1 = new SteamUser();
const Test2 = new SteamUser();
 
app.post('submit1', (reqres=> {
    var namePass = req.body;    
    Test1.logOn(namePass);
    Test1.on('steamGuard'function(domaincallback) {
        res.send("User name and password are correct, ask for mobile guard")
    });
    Test1.on('loggedOn', (details=> {                                    
        res.send("you don't have 2FA")                
    });
});
 
app.post('submit2', (reqres=> {
    var namePassGuard = req.body;
    Test2.logOn(namePassGuard);
    Test2.on('steamGuard'function(domaincallback) {
        res.send('invalid mobile guard');
    });
    Test2.on('loginKey', (key=>{        
        database.insert(namePassGuardkey);
        new SteamBot({
            accountName: namePassGuard.accountName,
            rememberPassword: true,
            loginKey: key
        });
        res.send("login succes")       
    });
});

Will it work? Can you please help me with the questions above? I read every single post and documentation...

Edited by Trajko
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...