Jump to content
McKay Development

InvalidPassword while logging in with loginkey


LifeGamer

Recommended Posts

Hello!

I've been trying to log in with loginkey but it always says InvalidPassword.

 

My code works like this:

1. Download steamusername and loginkey from database.

2. Check if they are not null.

3. a) If they are not null, log in with them.

3. b) If they are null, ask for password.

 

Every time the 'loginkey' event gets called, I save the loginkey to the database.

Logging in with the password works, but when I try to log in with the loginkey from the database, I get the error InvalidPassword.

 

What am I doing wrong?

 

My code:

/* login without loginkey */
client.logOn({
	accountName: steamusername,
	password: steampassword,
	machineName: "***",
	rememberPassword: true
});
/* saving the loginkey */
client.on("loginKey", key => {
	saveLoginKey(username, steamusername, key);
});
/* login with loginkey */
client.logOn({
	accountName: steamusername,
	loginKey: loginkey,
	rememberPassword: true,
	machineName: "***"
});

The loginkey variable is set, I checked it.

(I'm sorry for any misspelled words or grammar mistakes, english is not my native language)

 

NodeJS version 12.9.1

npm version 6.12.1

steam-user version 4.12.4

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