Wox.Plugin.Spotify icon indicating copy to clipboard operation
Wox.Plugin.Spotify copied to clipboard

Search is broken due changes in Spotify authorization policy

Open DomasM opened this issue 8 years ago • 8 comments

Issue Description

Can't search for tracks or anything else that uses WebAPI due changes in Spotify authorization policy https://developer.spotify.com/news-stories/2017/01/27/removing-unauthenticated-calls-to-the-web-api/

Functionality Affected

Please mark the functionality of the plugin that is affected by the issue:

  • [ ] Controlling the local Spotify client (changing track, pausing, skipping, muting)
  • [x] Searching Spotify for albums, artists or songs

DomasM avatar Jun 08 '17 08:06 DomasM

https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/7e6cdf563a5c1a6076d5057db76819d9b349ee53/SpotifyAPI.Docs/docs/SpotifyWebAPI/auth.md

DomasM avatar Jun 08 '17 08:06 DomasM

Hey, thanks for reporting this. I recently noticed the WebAPI doesn't work and figured Spotify changed something again, but this is a bigger change than I had expected.

Unfortunately I will be too busy for the rest of the month. I will try to at least publish a temporary solution for the time being...

JohnTheGr8 avatar Jun 14 '17 13:06 JohnTheGr8

I published a quick release. The user is now prompted to authorise the plugin before being able to search Spotify...

Like I said, this will most likely be a temporary solution, since it is far from ideal...

I am leaving this issue open. Any feedback will be appreciated.

JohnTheGr8 avatar Jun 14 '17 19:06 JohnTheGr8

I have looked into Spotify authorization after raising issue and things don't look so nice. Only way to have infinite authorization is to use Authorization code flow. Parts of authorization must be handled in backend to avoid exposing secrets. My idea was to create a couple of Azure functions (one for initial authorization, one for token refresh); this plugin would get temporary access token from the second function by supplying GUID (unique for each user of course). If refresh token would be saved on client side too (I think that might be not the best practice, but who cares) then there would be no need for cloud storage and with our potential "huge" user base Azure functions would be 0.00 Euro/ month. It would be nice to hear if that seems reasonable. I could take care of this.

DomasM avatar Jun 14 '17 19:06 DomasM

I was thinking of writing a simple php script (as recommended in the docs page you linked above) since I have a server that I could use (and I am not familiar with Azure). Agreed on the rest.

JohnTheGr8 avatar Jun 14 '17 20:06 JohnTheGr8

OK, then it will be up to you as I don't know php and don't want to learn it either.

DomasM avatar Jun 14 '17 20:06 DomasM

Hey @JohnTheGr8 , any news on this? The plugin is working absolutely spot on, in my opinion the best there is for Wox, and a multi-tasking wonder, but everytime wox closes you have to authorize it. Hope you didn't abandon this, i know it's one of those projects that is always choking up on free time (and done for free), but just know that on this side are users who really appreciate your work!

jppmarujo avatar Apr 05 '18 18:04 jppmarujo

Thanks for you kind words, @jppmarujo

Unfortunately, I have been too busy with work lately and had to set this aside. I promise to get back to it when I get some free time, it bothers me as much as it bothers everyone else :)

JohnTheGr8 avatar Apr 05 '18 21:04 JohnTheGr8