File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
dropbox-sdk-dotnet/Dropbox.Api Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -640,7 +640,8 @@ private async Task<Result> RequestJsonString(
640
640
private async Task < bool > CheckAndRefreshAccessToken ( )
641
641
{
642
642
bool canRefresh = this . options . OAuth2RefreshToken != null && this . options . AppKey != null ;
643
- bool needsRefresh = this . options . OAuth2AccessTokenExpiresAt . HasValue && DateTime . Now . AddSeconds ( TokenExpirationBuffer ) >= this . options . OAuth2AccessTokenExpiresAt . Value ;
643
+ bool needsRefresh = ( this . options . OAuth2AccessTokenExpiresAt . HasValue && DateTime . Now . AddSeconds ( TokenExpirationBuffer ) >= this . options . OAuth2AccessTokenExpiresAt . Value ) ||
644
+ ( this . options . OAuth2RefreshToken != null && ! this . options . OAuth2AccessTokenExpiresAt . HasValue ) ;
644
645
bool needsToken = this . options . OAuth2AccessToken == null ;
645
646
if ( ( needsRefresh || needsToken ) && canRefresh )
646
647
{
You can’t perform that action at this time.
0 commit comments