From 7ea1a1af48ff6ab76bc9559cd3a1787c2ce1d10a Mon Sep 17 00:00:00 2001 From: Jim Date: Sat, 10 Jun 2017 21:50:16 +0200 Subject: [PATCH] Update WebApiFactory.cs (#153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This could fix the ImplicitGrantAuth for http paths without breaking anything. ´TrimEnd` is there for when there is no path (the builder will add a `/` which will make the callback url invalid otherwise. --- SpotifyAPI/Web/Auth/WebApiFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpotifyAPI/Web/Auth/WebApiFactory.cs b/SpotifyAPI/Web/Auth/WebApiFactory.cs index a5ae9755..22fab8ee 100644 --- a/SpotifyAPI/Web/Auth/WebApiFactory.cs +++ b/SpotifyAPI/Web/Auth/WebApiFactory.cs @@ -35,7 +35,7 @@ namespace SpotifyAPI.Web.Auth { var authentication = new ImplicitGrantAuth { - RedirectUri = $"{_redirectUrl}:{_listeningPort}", + RedirectUri = new UriBuilder(_redirectUrl) { Port = _listeningPort }.Uri.OriginalString.TrimEnd('/'), ClientId = _clientId, Scope = _scope, State = _xss