From a2b94536bcd93e431bca4b59455b8d7c49abcd0f Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Sat, 22 Dec 2018 21:39:46 +0100 Subject: [PATCH] Restore example --- SpotifyAPI.Web.Example/Program.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/SpotifyAPI.Web.Example/Program.cs b/SpotifyAPI.Web.Example/Program.cs index 13e6eb59..cefa2a80 100644 --- a/SpotifyAPI.Web.Example/Program.cs +++ b/SpotifyAPI.Web.Example/Program.cs @@ -28,12 +28,7 @@ namespace SpotifyAPI.Web.Example AuthorizationCodeAuth auth = new AuthorizationCodeAuth(_clientId, _secretId, "http://localhost:4002", "http://localhost:4002", Scope.PlaylistReadPrivate | Scope.PlaylistReadCollaborative); - auth.AuthReceived += async (sender, payload) => - { - auth.Stop(); - Token token = await auth.ExchangeCode(payload.Code); - SpotifyWebAPI api = new SpotifyWebAPI() {TokenType = token.TokenType, AccessToken = token.AccessToken}; - }; + auth.AuthReceived += AuthOnAuthReceived; auth.Start(); auth.OpenBrowser();