File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Umbraco.Forms.Integrations.Crm.Hubspot/Services Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -292,15 +292,15 @@ private bool TryGetSavedRefreshToken(out string refreshToken)
292
292
293
293
private async Task < string > GetOAuthAccessTokenFromCacheOrRefreshToken ( string refreshToken )
294
294
{
295
- var accessToken = _appCaches . RuntimeCache . Get ( AccessTokenCacheKey ) . ToString ( ) ;
296
- if ( string . IsNullOrEmpty ( accessToken ) )
295
+ var accessToken = _appCaches . RuntimeCache . Get ( AccessTokenCacheKey ) ;
296
+ if ( accessToken != null )
297
297
{
298
298
// No access token in the cache, so get a new one from the refresh token.
299
299
await RefreshOAuthAccessToken ( refreshToken ) ;
300
300
accessToken = _appCaches . RuntimeCache . Get ( AccessTokenCacheKey ) . ToString ( ) ;
301
301
}
302
302
303
- return accessToken ;
303
+ return accessToken != null ? accessToken . ToString ( ) : string . Empty ;
304
304
}
305
305
306
306
private async Task RefreshOAuthAccessToken ( string refreshToken )
You can’t perform that action at this time.
0 commit comments