Browse Source

refactoring

pull/24050/head
erdemcaygor 5 months ago
parent
commit
e4e8da3911
  1. 6
      npm/ng-packs/packages/oauth/src/lib/services/memory-token-storage.service.ts
  2. 3
      npm/ng-packs/packages/oauth/src/lib/services/oauth.service.ts

6
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);

3
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();
}
}

Loading…
Cancel
Save