Skip to content

Commit

Permalink
Fix twitter AccessTokenSecret check (#12331)
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco authored Sep 4, 2022
1 parent 909ca96 commit 8b43028
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ public async Task ConfigureOAuthAsync(HttpRequestMessage request)
var protrector = _dataProtectionProvider.CreateProtector(TwitterConstants.Features.Twitter);
var queryString = request.RequestUri.Query;

if (!string.IsNullOrWhiteSpace(settings.ConsumerSecret))
if (!String.IsNullOrWhiteSpace(settings.ConsumerSecret))
{
settings.ConsumerSecret = protrector.Unprotect(settings.ConsumerSecret);
if (!string.IsNullOrWhiteSpace(settings.ConsumerSecret))
}

if (!String.IsNullOrWhiteSpace(settings.AccessTokenSecret))
{
settings.AccessTokenSecret = protrector.Unprotect(settings.AccessTokenSecret);
}

var nonce = GetNonce();
var timeStamp = Convert.ToInt64((_clock.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds).ToString();
Expand Down

0 comments on commit 8b43028

Please sign in to comment.