From 56539d4690807be003b878fa890d81befcfe3f5b Mon Sep 17 00:00:00 2001 From: Matt Portune Date: Thu, 24 Sep 2020 11:47:36 -0400 Subject: [PATCH] perform full sync upon successful login with sso --- src/app/accounts/sso.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/accounts/sso.component.ts b/src/app/accounts/sso.component.ts index dd7696271a..f657c66107 100644 --- a/src/app/accounts/sso.component.ts +++ b/src/app/accounts/sso.component.ts @@ -13,6 +13,7 @@ import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { StateService } from 'jslib/abstractions/state.service'; import { StorageService } from 'jslib/abstractions/storage.service'; +import { SyncService } from 'jslib/abstractions/sync.service'; import { SsoComponent as BaseSsoComponent } from 'jslib/angular/components/sso.component'; @@ -22,13 +23,16 @@ import { SsoComponent as BaseSsoComponent } from 'jslib/angular/components/sso.c }) export class SsoComponent extends BaseSsoComponent { constructor(authService: AuthService, router: Router, - i18nService: I18nService, route: ActivatedRoute, + i18nService: I18nService, syncService: SyncService, route: ActivatedRoute, storageService: StorageService, stateService: StateService, platformUtilsService: PlatformUtilsService, apiService: ApiService, cryptoFunctionService: CryptoFunctionService, passwordGenerationService: PasswordGenerationService) { super(authService, router, i18nService, route, storageService, stateService, platformUtilsService, apiService, cryptoFunctionService, passwordGenerationService); + super.onSuccessfulLogin = () => { + return syncService.fullSync(true); + }; this.redirectUri = 'bitwarden://sso-callback'; this.clientId = 'desktop'; }