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(
640640 private async Task < bool > CheckAndRefreshAccessToken ( )
641641 {
642642 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 ) ;
644645 bool needsToken = this . options . OAuth2AccessToken == null ;
645646 if ( ( needsRefresh || needsToken ) && canRefresh )
646647 {
You can’t perform that action at this time.
0 commit comments