From e4e8da391199946869f457d391cbf6dd07c9221f Mon Sep 17 00:00:00 2001 From: erdemcaygor Date: Fri, 31 Oct 2025 14:31:13 +0300 Subject: [PATCH] refactoring --- .../oauth/src/lib/services/memory-token-storage.service.ts | 6 +----- .../packages/oauth/src/lib/services/oauth.service.ts | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/npm/ng-packs/packages/oauth/src/lib/services/memory-token-storage.service.ts b/npm/ng-packs/packages/oauth/src/lib/services/memory-token-storage.service.ts index d8708e02f5..0d7bb3786f 100644 --- a/npm/ng-packs/packages/oauth/src/lib/services/memory-token-storage.service.ts +++ b/npm/ng-packs/packages/oauth/src/lib/services/memory-token-storage.service.ts @@ -56,14 +56,10 @@ export class MemoryTokenStorageService implements OAuthStorage { break; } }; - - console.log('✅ Using SharedWorker for cross-tab token storage'); } catch (error) { - console.warn('⚠️ SharedWorker failed:', error); this.useSharedWorker = false; } } else { - console.warn('⚠️ SharedWorker not supported'); this.useSharedWorker = false; } } @@ -96,7 +92,7 @@ export class MemoryTokenStorageService implements OAuthStorage { } if (this.useSharedWorker && this.port) { - // this.cache.delete(key); + this.cache.delete(key); this.port.postMessage({ action: 'remove', key }); } else { this.cache.delete(key); diff --git a/npm/ng-packs/packages/oauth/src/lib/services/oauth.service.ts b/npm/ng-packs/packages/oauth/src/lib/services/oauth.service.ts index d3d3ca9dec..8a30b098e1 100644 --- a/npm/ng-packs/packages/oauth/src/lib/services/oauth.service.ts +++ b/npm/ng-packs/packages/oauth/src/lib/services/oauth.service.ts @@ -113,7 +113,8 @@ export class AbpOAuthService implements IAuthService { try { return this.oAuthService.refreshToken(); } catch (error) { - return Promise.resolve(); + console.log("Error while refreshing token: ", error); + return Promise.reject(); } }