DoctorMcKay / node-steam-session

Node.js module for authenticating with the Steam auth server. Allows for generating refresh tokens and web auth cookies for use with steam-user and other packages.
https://www.npmjs.com/package/steam-session
MIT License
117 stars 22 forks source link

ERROR: This login attempt has failed! FileNotFound #27

Closed WhZzi closed 1 year ago

WhZzi commented 1 year ago

Describe the bug

Login occur FileNotExist, result from steamapi

Versions

1.3.0

Screenshots and Error Logs

image

WhZzi commented 1 year ago

Some possible reasons I have discovered so far:

After submitting with a guard_code, it will first send “ https://api.steampowered.com/IAuthenticationService/UpdateAuthSessionWithSteamGuardCode/v1 ”request, as made in your code, but followed by “ https://api.steampowered.com/IAuthenticationService/PollAuthSessionStatus/v1 ” request for has actually returned an Eresult with a successful login, but your code does not seem to recognize the status of this login success (it seems to be because the return value does not carry access_token)

DoctorMcKay commented 1 year ago

Yes, this appears to be because Steam is no longer returning access tokens in PollAuthSessionStatus. A simple enough fix.

WhZzi commented 1 year ago

Yes, this appears to be because Steam is no longer returning access tokens in PollAuthSessionStatus. A simple enough fix.

Should we use refresh token to request for access token? becasue it return refresh_token actually

image

DoctorMcKay commented 1 year ago

https://github.com/DoctorMcKay/node-steam-session/releases/tag/v1.3.1

You very likely don't need an access token. If you're using getWebCookies() to get your web session, that takes care of everything internally.