From e1ce72136490b9055d8d6a03988e9d39ac560a89 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 23 Jul 2021 20:05:34 +0200 Subject: [PATCH] [Provider] Refresh identity token on full sync (#437) --- common/src/services/notifications.service.ts | 1 - common/src/services/sync.service.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/services/notifications.service.ts b/common/src/services/notifications.service.ts index 7fb401f9b2..63f66b8b71 100644 --- a/common/src/services/notifications.service.ts +++ b/common/src/services/notifications.service.ts @@ -151,7 +151,6 @@ export class NotificationsService implements NotificationsServiceAbstraction { break; case NotificationType.SyncOrgKeys: if (isAuthenticated) { - await this.apiService.refreshIdentityToken(); await this.syncService.fullSync(true); // Stop so a reconnect can be made await this.signalrConnection.stop(); diff --git a/common/src/services/sync.service.ts b/common/src/services/sync.service.ts index 2ae723840b..5df582ecae 100644 --- a/common/src/services/sync.service.ts +++ b/common/src/services/sync.service.ts @@ -94,6 +94,7 @@ export class SyncService implements SyncServiceAbstraction { const userId = await this.userService.getUserId(); try { + await this.apiService.refreshIdentityToken(); const response = await this.apiService.getSync(); await this.syncProfile(response.profile);