Jump to content
McKay Development

Recommended Posts

Posted (edited)

changePassword() takes the e-mail code that gets sent to you as its third argument. It's a catch-22 that I don't understand, though, because the e-mail code doesn't get sent until you call that function.

 

Regardless of whether you add the argument, a prompt comes up and proceeds to *not* use the input and use the argument as the code.

 

What am I missing? Sorry, but I couldn't figure it out looking at the documentation.

 

 



const User = new SteamUser();


User.logOn({
  'accountName': <username>,
  'password': <password>
});


User.on('loggedOn', function() {
  console.log('Successfully logged in');


  User.changePassword(<old password>, <new password>, <random string>, function(err) { // how are you supposed to provide the code when it gets activated by the function?
    console.log(err);
  });
});


Edited by Jack
Posted

If you don't have a mobile authenticator enabled, you should call requestPasswordChangeEmail first to get an email sent to you. If you do have a mobile authenticator enabled, you should skip the email entirely and just use a 2FA code when you call changePassword.

 

You mentioned a "prompt comes up", is it the "Steam Guard App Code: " or "Steam Guard Code: " prompt? If so, that's not the prompt for changing your password, it's the prompt for logging in. If you don't disable the promptSteamGuardCode option then if you don't supply a Steam Guard code in logOn it will prompt for one from stdin. And since you can't use mobile authenticator codes twice, if you do have a mobile authenticator enabled you need to supply a code to login, then wait 30 seconds before trying to change your password so you'll get another code.

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...