THEzombiePL Posted 21 hours ago Report Posted 21 hours ago const { LoginSession, EAuthTokenPlatformType } = require('steam-session'); const qrcode = require('qrcode-terminal'); // We need to wrap everything in an async function since node <14.8 cannot use await in the top-level context main(); async function main() { // Create our LoginSession and start a QR login session. let session = new LoginSession(EAuthTokenPlatformType.MobileApp); session.loginTimeout = 120000; // timeout after 2 minutes let startResult = await session.startWithQR(); qrcode.generate(startResult.qrChallengeUrl, { small: true }); session.on('remoteInteraction', () => { console.log('Looks like you\'ve scanned the code! Now just approve the login.'); }); // No need to handle steamGuardMachineToken since it's only applicable to accounts using email Steam Guard, // and such accounts can't be authed using a QR code. session.on('authenticated', async () => { console.log('\nAuthenticated successfully! Printing your tokens now...'); console.log(`SteamID: ${session.steamID}`); console.log(`Account name: ${session.accountName}`); console.log(`Access token: ${session.accessToken}`); console.log(`Refresh token: ${session.refreshToken}`); // We can also get web cookies now that we've negotiated a session let webCookies = await session.getWebCookies(); console.log('Web session cookies:'); console.log(webCookies); }); session.on('timeout', () => { console.log('This login attempt has timed out.'); }); session.on('error', (err) => { // This should ordinarily not happen. This only happens in case there's some kind of unexpected error while // polling, e.g. the network connection goes down or Steam chokes on something. console.log(`ERROR: This login attempt has failed! ${err.message}`); }); } response: QRCODE... Looks like you've scanned the code! Now just approve the login. ERROR: This login attempt has failed! FileNotFound Quote
THEzombiePL Posted 21 hours ago Author Report Posted 21 hours ago I used the official example to test but it doesn't work. I want to combine this with the steam-user library (which is working fine so far but I want to add qr login) Quote
Dr. McKay Posted 9 hours ago Report Posted 9 hours ago Did you decline the login on your mobile device? That's what I've seen cause FileNotFound. Quote
THEzombiePL Posted 4 hours ago Author Report Posted 4 hours ago (edited) 5 hours ago, Dr. McKay said: Did you decline the login on your mobile device? That's what I've seen cause FileNotFound. I accepted the login over the phone and closed the dialog box with security questions about the login sample questions: are you trying to pick up a free skin or are you trying to enter a tournament Edited 3 hours ago by THEzombiePL Additional information Quote
THEzombiePL Posted 29 minutes ago Author Report Posted 29 minutes ago I already found the reason and solved it, it was the fault that I use vpn and closing the dialog box with security questions worked for logging in with steamguard code but automatically rejects logging in with qr code. 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.