DoctorMcKay / node-steam-client

API-compatible fork of node-steam's SteamClient
https://steamcommunity.com/groups/SteamRE/discussions/1/
MIT License
52 stars 19 forks source link

How to use with SteamGuard ? #11

Closed Coriou closed 7 years ago

Coriou commented 7 years ago

As always with Valve, documentation is scarce and often inaccurate so I can't find how to pass the SteamGuard authentication code to the logOn method.

I'm guessing it's another field to add to the payload, but I can't find the key... I tried "guard", "auth", ... in a pure "I'm feeling lucky" spirit. Weren't lucky unfortunately.

Any idea or source of documentation someone could link me please ?

Coriou commented 7 years ago

Ok, after a bit more digging and just after posting this issue (as always), I found the solution (in steammessages_clientserver_login.proto) :

The key is two_factor_code :

client.logOn({
    "account_name": "XXX",
    "password": "XXX",
    "two_factor_code": "XXX"
})

Hope this helps others too ! Thanks for the handy client wrapper !

DoctorMcKay commented 7 years ago

It's worth noting that you're probably looking for steam-user. It's a much more complete library which uses this at a lower level.

Coriou commented 7 years ago

Yes @DoctorMcKay, in the end that's what I did instead of trying to build my own requests from steam-client, I noticed everything was already there and working well in steam-user :)

Thanks so much, you saved me a lot of time !