DMarby / humblebundle-ebook-downloader

An easy way to download ebooks from your humblebundle account
The Unlicense
230 stars 27 forks source link

Update auth to look for the humbleguard page #20

Closed kfarnung closed 6 years ago

kfarnung commented 6 years ago

Fixes #19

DMarby commented 6 years ago

Hi,

Thanks for your PR! When testing it, it didn't seem to make a difference for me, as I don't get redirected to the humbleguard page when logging in.

After looking into this further it seems like the root cause of #19 was that the redirect event was no longer triggered, so it needed to hook the "will-redirect" event instead. I've gone ahead and made this change and pushed it to master.

However, my change presumably doesn't fix the usecase of getting prompted with the humbleguard page. Looking at the changes in your PR, it's now grabbing the session cookie from the humbleguard page as well. When you get to the humbleguard page, is the session id already set, so intended behavior is to just grab it and consider authentication done, or should further authentication happen before? Will the humbleguard page redirect anywhere after authentication has been done?

kfarnung commented 6 years ago

Thanks for taking a look, this was a pretty hacky workaround and did allow me to get my books downloaded. I did confirm that the session cookie was already set on the humbleguard page (although I found that weird to be honest). I'll give your changes a try tonight and see if that takes care of it.

EDIT: I just gave your changes a try and everything seems to work! Thanks!