DoctorMcKay / node-steam-user

Allows interaction with the Steam network via the Steam client protocol
https://dev.doctormckay.com/forum/7-node-steam-user/
MIT License
880 stars 157 forks source link

Machine ID inconsistent between logins #502

Open Sadzurami opened 2 days ago

Sadzurami commented 2 days ago

Describe the bug

For machine id creation SteamUser uses account_name | steamid, while SteamSession only uses account_name as account identifier.

When we logs using SteamUser with refresh token, instance will use steamid, we can't pass account_name. While SteamSession used account_name while refresh token was created.

https://github.com/DoctorMcKay/node-steam-user/blob/686d773f88df373ed0e7be845a37c46dd081d9b1/components/09-logon.js#L122-L135

https://github.com/DoctorMcKay/node-steam-user/blob/686d773f88df373ed0e7be845a37c46dd081d9b1/resources/default_options.js#L26-L28

https://github.com/DoctorMcKay/node-steam-user/blob/686d773f88df373ed0e7be845a37c46dd081d9b1/components/09-logon.js#L581-L588

https://github.com/DoctorMcKay/node-steam-user/blob/686d773f88df373ed0e7be845a37c46dd081d9b1/components/09-logon.js#L598-L602

Versions

5.2.0

Sadzurami commented 2 days ago

Proposal: allow to pass account_name to logOn options.

Sadzurami commented 2 days ago

Also proposal, but not related this issue: move functions like 'createMachineId' and 'createMachineName', which uses by both SteamUser and SteamSession, to separate package, like @doctormckay/stdlib/hardware or @doctormckay/steam-hardware or smth like that. Main idea - keep consistency between packages, that consumes that functional.

Sadzurami commented 2 days ago

Also proposal: allow to pass machine_id directly to logOn method, like it implemented in SteamSession options.