[Provider] Refresh identity token on full sync (#437)

This commit is contained in:
Oscar Hinton 2021-07-23 20:05:34 +02:00 committed by GitHub
parent de288913e4
commit e1ce721364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,6 @@ export class NotificationsService implements NotificationsServiceAbstraction {
break; break;
case NotificationType.SyncOrgKeys: case NotificationType.SyncOrgKeys:
if (isAuthenticated) { if (isAuthenticated) {
await this.apiService.refreshIdentityToken();
await this.syncService.fullSync(true); await this.syncService.fullSync(true);
// Stop so a reconnect can be made // Stop so a reconnect can be made
await this.signalrConnection.stop(); await this.signalrConnection.stop();

View File

@ -94,6 +94,7 @@ export class SyncService implements SyncServiceAbstraction {
const userId = await this.userService.getUserId(); const userId = await this.userService.getUserId();
try { try {
await this.apiService.refreshIdentityToken();
const response = await this.apiService.getSync(); const response = await this.apiService.getSync();
await this.syncProfile(response.profile); await this.syncProfile(response.profile);