Skip to content

Commit

Permalink
todo cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Sep 22, 2022
1 parent f2cdd7d commit 51a2746
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public Task ClearTokenAsync(
ClaimsPrincipal user,
UserTokenRequestParameters? parameters = null)
{
// todo
// don't bother here, since likely we're in the middle of signing out
return Task.CompletedTask;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ private async Task<UserToken> RefreshUserAccessTokenAsync(
{
var userToken = await _userAccessTokenStore.GetTokenAsync(user, parameters);

// todo: should not happen - should we use better exception?
ArgumentNullException.ThrowIfNull(userToken.RefreshToken);
if (String.IsNullOrWhiteSpace(userToken.RefreshToken))
{
throw new InvalidOperationException("No refresh token in store.");
}

var refreshedToken =
await _tokenEndpointService.RefreshAccessTokenAsync(userToken.RefreshToken, parameters, cancellationToken);
Expand Down

0 comments on commit 51a2746

Please sign in to comment.