nicoSWD / put.io-adder

macOS put.io client that acts as handler for magnet: links and .torrent files, and adds them to your put.io download queue
MIT License
195 stars 23 forks source link

Difficulty authenticating: token not showing up in callback URL. #28

Closed phyllisstein closed 6 years ago

phyllisstein commented 6 years ago

Hey there! I'm having some trouble authenticating the app with Put.io again. The symptoms are similar to what was reported in #24:

screenshot 3

The odd thing is that the authentication URL doesn't match the regular expression in #25 because the token isn't being included in the callback. Instead, the authentication page bounces me to this URL:

https://api.put.io/v2/oauth2/authenticate?client_id=711&response_type=token&redirect_uri=putio://callback

Is it possible that they've changed their login flows again, or am I missing something? Thanks in advance for any thoughts you have!

nicoSWD commented 6 years ago

Hey @phyllisstein!

Thanks for letting me know. I'll look into this issue

Would be strange if they changed something. But then again they broke stuff in the same version of their API before.

I'll see...

irrg commented 6 years ago

Thought it was just me!

The Chrome put.io extension is also busted, but nobody seems to have commented about it: https://chrome.google.com/webstore/detail/putio-extension/lmonmjokfiamaoddkeofepnapdldbejb/reviews?hl=en

I probably wouldn't have noticed if I still had an active token, but I got a new computer…

altaywtf commented 6 years ago

Hey guys! We made some changes in our authentication api but it shouldn't be a problem for oauth apps which set/receive callback urls properly.

@nicoSWD I've just cloned the repo and tested out myself and this issue should be resolved if you revert this commit: https://github.com/nicoSWD/put.io-adder/commit/2e35da6ee2b58911e48f517c0ef67d0df1cdef32

we don't add additional parameters or trailing slashes (anymore 😅) that needs to be escaped unless you send a state param on the auth url. in that case the url has a shape like putio://callback?state=test#access_token=ABC which can be parsed with just @"#access_token=(.*)"

nicoSWD commented 6 years ago

@altayaydemir awesome, thank you very much! I'll see if I find some time tonight to push a new build with the fix. 😄

irrg commented 6 years ago

Thanks @altayaydemir !

altaywtf commented 6 years ago

@nicoSWD @irrg no worries! (and sorry for the inconvenience 😿)

nicoSWD commented 6 years ago

I just pushed a new release which should fix authentication issues:

Thanks everyone! :smile:

nicoSWD commented 6 years ago

I'm closing this issue for now.

If anyone keeps having problems, please open a new issue!

Thank you all! :smiley: