aleab / toastify

:mega: TOASTIFY DEVELOPMENT HAS STOPPED | Toastify adds global hotkeys and toast notifications to Spotify
https://aleab.github.io/toastify
GNU General Public License v2.0
433 stars 48 forks source link

How Authentication is handled ? #106

Open trash-anger opened 5 years ago

trash-anger commented 5 years ago

Hi,

This is not really a bug but more a question about how does the authentication works...

I know toastify use SpotifyAPI-NET to work. SpotifyAPI-NET implements the 3 auth methods :

But I see no reference of it in the toastify code. There is also no need for an app grant during the first use.

How does it works ?

trash-anger commented 5 years ago

After few research it seams to be in ToastifyWebAuthAPI.dll. I assume it's not open sourced... the thing is that I would like to do something similar on osx. The goal would be to develop an app which would show the artist name and the song in the touchbar on the macs.

aleab commented 5 years ago

Hi @trash-anger Yep, you are correct, the auth code is in ToastifyWebAuthAPI.dll and I haven't open sourced it; I can share most of it, but I don't think it will be of great help to you since I'm using a lot of Windows API functions in there.

I'm not using SpotifyAPI-NET for the auth, I just implemented my own following Spotify's guides, the AuthorizationCode flow in particular which requires part of the auth flow to be performed server-side.

The core of the client-side code is here (written in C++); the server-side one is here (NodeJS/Express).

hartmark commented 5 years ago

@aleab would you like to put the code into the public domain on a github repo with solution files and a simple todo for setting it up.