Jump to content
McKay Development

setMobileAppAccessToken relogin??


steamsessions

Recommended Posts

Am slightly confused. i need to enable TwoFactor via node 
i've done this in the past with no issues 

having some trouble with enableTwoFactor from community just returning null no matter what now

looking at the docs it seems i now need to use steam session 
what confuses me is 
if am already logged in via community & / user

do i need to login again via steam session? theres no way to init steam session with a community session like setCookies or something? 

how do i setMobileAppAccessToken without having to relog in via steam session? 

Link to comment
Share on other sites

There isn't, unfortunately. Steam changed the way things work, and the only way to get an access token that can be used for enabling 2FA is by logging in with steam-session using EAuthTokenPlatformType.MobileApp. steam-user uses EAuthTokenPlatformType.SteamClient.

It's worth mentioning that steam-user does have the ability to enable 2FA on its own, although I haven't tested this in a long while and there's a chance it doesn't work anymore.

Edited by Dr. McKay
Link to comment
Share on other sites

was trying with the enableTwoFactor from user and it seemed entirely broken

i then tried with enableTwoFactor from SteamCommunity and it stated "No mobile access token available. Provide one by calling setMobileAppAccessToken()" which lead me to steam session

i figured out what the issue was don't know if it's something u wanna check out or not
however https://github.com/DoctorMcKay/node-steam-session/blob/master/examples/login-with-password.ts

	let startResult = await session.startWithCredentials({
		accountName,
		password,
		steamGuardMachineToken
	});

return the error mentioned earlier

let startResult =  session.startWithCredentials({
	accountName: username,
	password: password,
	steamGuardMachineToken: var,
	steamGuardCode: var2
});

as shown on your link works fine. seems steamGuardCode is a required parameter?

 

time to see if i can get the rest to work ^^ ty for the steam-user link 

Edited by steamsessions
Link to comment
Share on other sites

I don't know what to tell you. Maybe you weren't pasting your password correctly. It works fine for me as-is.

image.png

 

Passing a steamGuardCode to startWithCredentials wouldn't change anything with respect to that InvalidParam error. It's raised before the code is sent to Steam.

Looking back at your post, in the second code block you're passing accountName: username, which would be correct if your account name is stored in a "username" variable. In the first block, copied from the example script, you're passing it as accountName. If that variable was empty, that would explain your InvalidParam issue.

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