mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 19:40:05 -07:00
More improvements to the Plex OAuth, Added the ability to turn it off if needed
This commit is contained in:
parent
f62e97bb32
commit
e12146c986
10 changed files with 40 additions and 14 deletions
|
@ -55,15 +55,24 @@ namespace Ombi.Core.Authentication
|
|||
return await _api.GetAccount(accessToken);
|
||||
}
|
||||
|
||||
public async Task<Uri> GetOAuthUrl(int pinId, string code)
|
||||
public async Task<Uri> GetOAuthUrl(int pinId, string code, string websiteAddress = null)
|
||||
{
|
||||
var settings = await _customizationSettingsService.GetSettingsAsync();
|
||||
if (settings.ApplicationUrl.IsNullOrEmpty())
|
||||
Uri url;
|
||||
if (websiteAddress.IsNullOrEmpty())
|
||||
{
|
||||
return null;
|
||||
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 url = _api.GetOAuthUrl(pinId, code, settings.ApplicationUrl, false);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue