toastify icon indicating copy to clipboard operation
toastify copied to clipboard

How Authentication is handled ?

Open trash-anger opened this issue 6 years ago • 3 comments

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 :

  • ImplicitGrantAuth
  • AuthorizationCodeAuth
  • CredentialsAuth

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 avatar Feb 14 '19 01:02 trash-anger

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.

trash-anger avatar Feb 14 '19 01:02 trash-anger

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).

aleab avatar Feb 14 '19 14:02 aleab

@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.

hartmark avatar Mar 26 '19 12:03 hartmark