Skip to content

[BUG] MobileWebAuth login doesn't work #442

@voviz

Description

@voviz

Description
MobileWebAuth login doesn't work. Function _finalise_login throws an error -

line 323, in _finalize_login
    data = json.loads(login_response['oauth'])
                      ~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'oauth'

Everything worked fine until today, so probably the response body changed. I have changed the function to

def _finalize_login(self, login_response):
       data = login_response['transfer_parameters']
       self.steam_id = SteamID(data['steamid'])
       self.oauth_token = data['auth']

And the login seems to be ok. However steam guard can not be added
Code -

wa = MobileWebAuth("LOGIN")
wa.cli_login(password="PASSWORD")
sa = SteamAuthenticator(backend=wa)
status = sa.status()

Exception -

 line 267, in status
    return self._send_request('QueryStatus', {'steamid': self.backend.steam_id})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  line 155, in _send_request
    raise SteamAuthenticatorError("Error adding via WebAPI: %s" % str(exp))
steam.guard.SteamAuthenticatorError: Error adding via WebAPI: 401 Client Error: Unauthorized for url: https://api.steampowered.com/ITwoFactorService/QueryStatus/v1/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions