Revert "Fixed Plex OAuth, should no longer show Insecure warning"

This reverts commit c55fc32c63.
This commit is contained in:
Jamie Rees 2018-07-02 08:06:43 +01:00
parent c55fc32c63
commit cbf331cd09
4 changed files with 24 additions and 29 deletions

View file

@ -34,6 +34,19 @@ namespace Ombi.Core.Authentication
return string.Empty;
}
if (pin.authToken.IsNullOrEmpty())
{
// Looks like we do not have a pin yet, we should retry a few times.
var retryCount = 0;
var retryMax = 5;
var retryWaitMs = 1000;
while (pin.authToken.IsNullOrEmpty() && retryCount < retryMax)
{
retryCount++;
await Task.Delay(retryWaitMs);
pin = await _api.GetPin(pinId);
}
}
return pin.authToken;
}