Skip to content

Commit

Permalink
Removed old code that was commented out
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieran Bond authored and KieranBond committed Jan 31, 2020
1 parent 323169f commit 08bcaa6
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions MiniSpotify/MiniSpotify/Source/APIRequestor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,41 +78,10 @@ private async void AuthAPI()
//https://github.com/JohnnyCrazy/SpotifyAPI-NET
//https://johnnycrazy.github.io/SpotifyAPI-NET/auth/implicit_grant.html

//If token isn't set, or has expired
if (m_instance.m_authToken == null || m_instance.m_authToken.IsExpired())
{
string redirectURI = "http://localhost:4002";

#region Old Auth method

//AuthorizationCodeAuth auth = new AuthorizationCodeAuth(
// m_instance.m_clientID,
// m_instance.m_clientSecret,
// redirectURI,
// redirectURI,
// m_accessScopes);

//auth.AuthReceived += async (sender, payload) =>
//{
// auth.Stop(); //Sender is also the auth instance

// m_instance.m_authToken = await auth.ExchangeCode(payload.Code);

// m_spotifyWebAPI = new SpotifyWebAPI()
// {
// //TokenType = payload.TokenType,
// TokenType = m_instance.m_authToken.TokenType,
// //AccessToken = payload.AccessToken
// AccessToken = m_instance.m_authToken.AccessToken,
// UseAuth = true
// };

// m_instance.m_pollingTask = Task.Run(PollSongChange);//Start the song change polling

// m_instance.m_onAuthComplete.Invoke(GetLatestTrack());
//};
#endregion

ImplicitGrantAuth auth = new ImplicitGrantAuth(
m_instance.m_clientID,
redirectURI,
Expand All @@ -136,7 +105,7 @@ private async void AuthAPI()
};

auth.Start();//Starts an internal http server
auth.OpenBrowser();//Opens brower to authenticate app
auth.OpenBrowser();//Opens browser to authenticate app
}
}

Expand Down

0 comments on commit 08bcaa6

Please sign in to comment.