steamsessions Posted June 28, 2023 Report Posted June 28, 2023 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? Quote
Dr. McKay Posted June 28, 2023 Report Posted June 28, 2023 You have to use steam-session, at least for now. Quote
steamsessions Posted June 28, 2023 Author Report Posted June 28, 2023 is it even functional on CommonJS atm getting node_modules\steam-session\dist\helpers.js:17 let err = new Error(errorMessage || resultMsg); ^ Error: InvalidParam when using your sample code on CommonJS Quote
Dr. McKay Posted June 28, 2023 Report Posted June 28, 2023 (edited) Yes, it works fine for me. steam-user is using steam-session via CommonJS. Edited June 28, 2023 by Dr. McKay Quote
steamsessions Posted June 28, 2023 Author Report Posted June 28, 2023 ah is there anyway to grab the access_token from steam user then? would prevent me having to relog any idea why this might be happening tried copying the code u linked same error. Quote
Dr. McKay Posted June 28, 2023 Report Posted June 28, 2023 (edited) 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 June 28, 2023 by Dr. McKay Quote
steamsessions Posted June 28, 2023 Author Report Posted June 28, 2023 (edited) 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 June 28, 2023 by steamsessions Quote
Dr. McKay Posted June 28, 2023 Report Posted June 28, 2023 You removed the await keyword, so you aren't waiting for the promise to resolve or reject, so there's no opportunity for an error to be raised at all. Quote
steamsessions Posted June 28, 2023 Author Report Posted June 28, 2023 i did use async earlier had no difference am still not using async and it works fine after placing name:var rather than just var Quote
Dr. McKay Posted June 28, 2023 Report Posted June 28, 2023 I don't know what to tell you. Maybe you weren't pasting your password correctly. It works fine for me as-is. 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. Quote
steamsessions Posted June 28, 2023 Author Report Posted June 28, 2023 odd nothing changed other than changing from username to username:value across the board :shrug: Robert Lutece 1 Quote
Recommended Posts
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.