-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
authentication fails prior to processlogin #46
Comments
Perhaps a general suggestion: why not use https://www.humblebundle.com/api/v1/user/order instead of https://www.humblebundle.com/home/keys in |
The 2FA does break the login flow for this application, as it doesn't handle the fact that HumbleBundle requests an authentication code from the user before returning a page that includes the session cookie. Currently, I'm caught up on trying to fix |
Thanks for the reply @isavegas. I decided not to use this library, but manually get the session key using the method in this Stack Overflow answer. It's not very pretty, but since I only used it for my own scripts, I'm fine with it. |
... because at the time I started developing this, https://www.humblebundle.com/api/v1/user/order did not exist, or I was not aware of it! Thanks for pointing it out, an API endpoint from HumbleBundle might simplify the code immensely, and maybe help fix many auth-related issues such as #33, #32 and #10. It could also be a new starting point for #47 |
That's exactly what the |
I'm trying to get humblebundle.py to work, but can't get past the first authentication.
bundle.json
norgames.json
, and proceeds to runupdate()
.update()
attempts toget('/home/keys')
get()
fails in the following lines:The first error I got was:
This was easily fixed by two small fixes:
res.read()
withres.read().decode('utf-8')
and("Could not retrieve token: %r", e)
with("Could not retrieve token: %r" % e)
However, I still got an error:
The cause is that
r"(<input\s+[^>]*\s+name\s*=\s*['\"]_le_csrf_token['\"][^>]*>)"
can't be found in the HTML output of www.humblebundle.com/home/keys.A quick debug seems to indicate that HTML output is that of the Humble login page (https://www.humblebundle.com/login?goto=%2Fhome%2Fkeys, I expected httpbot or urllib2 handled the redirect), which -with a regular browser- does indeed NOT contain the word "
token
" nor "csrf
", let alone "_le_csrf_token
".Note that I enabled two factor authentication (2FA), not sure if that matters.
Any suggestion to help me debug this is appreciated!
The text was updated successfully, but these errors were encountered: