fow5040 / Wox.Plugin.SpotifyPremium

Forked from JohnTheGr8's Spotify plugin - uses the new Web API and requires Premium
MIT License
9 stars 6 forks source link

security.store not properly working with ClientID and ClientSecret #6

Open Hachondeoro opened 3 years ago

Hachondeoro commented 3 years ago

Issue Description

I'm trying to use my own ClientID and ClientSecret through the security.store file. But when I create the security.store file and place on the plugin directory, I get the following message:

INVALID_CLIENT: Invalid redirect URI

I would like to know if the following is still the correct format to place the ClientID and the ClientSecret: {"ClientID":"yourClientSecret","ClientSecret":"yourClientSecret"}

Functionality Affected

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

Software Versions

Please fill in the following information:

Please also make sure you're running the latest version of Wox.Plugin.Spotify

fow5040 commented 3 years ago

Hi @Hachondeoro, I almost forgot, you also need to go to the Developer Dashboard for your 'application', go to "edit settings", and add http://localhost:4002 as a redirect URI. I will add this to the Readme file.

Hachondeoro commented 3 years ago

Hi @fow5040 , thanks, that certainly worked. The main reason why I did it is because with the standard token, I get a message every hour saying: "Your token has expired, please select to reauthorize" when I want to search or play a song.

I have changed the ClientID and ClientSecret with my own now, but the message still persists after 1 hour. Is this fixable somehow?

Kind regards,

fow5040 commented 3 years ago

It can certainly be automated, but I left it to be manual because I want to make sure any automated authentication/refresh loop is particularly robust. Making the refresh automated isn't hard per se, but it is not a trivial change to make given the current Wox plugin workflow. I can mark this as an enhancement!