Jump to content
McKay Development

Guard code in app


jisa_poiur

Recommended Posts

I use machinesAuth to avoid requesting the access code from the application again after the first login when, for example, the bot is restarted.
But here's what I noticed, if the account is confirmed via mail - then after login a file with machine is created, but if the account is confirmed via application - then after login only cellid-***.txt is created and when logging in again it asks for the code from the application. I have looked everywhere, but did not find the answer to my question.

I also noticed that the machineAuthToken event is triggered only when a code is requested from mail

I use node-steam-user 5.0.4
 

const Account = new SteamUser({
    dataDirectory: "./data",
    machineIdType: SteamUser.EMachineIDType.AccountNameGenerated,
    autoRelogin: true
});

Account.logOn({
    accountName: 'login',
    password: 'password'
})

 

Edited by jisa_poiur
Link to comment
Share on other sites

14 hours ago, Dr. McKay said:

Machine auths are not issued for accounts that are using mobile 2FA. If you want to log on to such an account without providing a code, you'll need to use a refresh token.

Thanks for the reply.

I made the system via tokens, but when the user logs in via code from mail, it creates machineAuthToken.name.txt
I tried passing the machineIdType field to the SteamUser instance: SteamUser.EMachineIDType.None, but the file is still created, is there any way to disable this?

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