From 647a01ebb064faccbf3095b02db46494ded62973 Mon Sep 17 00:00:00 2001 From: Jamie Date: Sat, 28 Apr 2018 20:47:42 +0100 Subject: [PATCH] Use the Application URL if we have it to fix #2201 --- .../Authentication/PlexOAuthManager.cs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/Ombi.Core/Authentication/PlexOAuthManager.cs b/src/Ombi.Core/Authentication/PlexOAuthManager.cs index f3a3e4d01..37ed7d2f7 100644 --- a/src/Ombi.Core/Authentication/PlexOAuthManager.cs +++ b/src/Ombi.Core/Authentication/PlexOAuthManager.cs @@ -57,21 +57,8 @@ namespace Ombi.Core.Authentication public async Task GetOAuthUrl(int pinId, string code, string websiteAddress = null) { - Uri url; - if (websiteAddress.IsNullOrEmpty()) - { - var settings = await _customizationSettingsService.GetSettingsAsync(); - if (settings.ApplicationUrl.IsNullOrEmpty()) - { - return null; - } - - url = _api.GetOAuthUrl(pinId, code, settings.ApplicationUrl, false); - } - else - { - url = _api.GetOAuthUrl(pinId, code, websiteAddress, false); - } + var settings = await _customizationSettingsService.GetSettingsAsync(); + var url = _api.GetOAuthUrl(pinId, code, settings.ApplicationUrl.IsNullOrEmpty() ? websiteAddress : settings.ApplicationUrl, false); return url; }