diff --git a/apps/browser/src/auth/popup/login/extension-login.service.ts b/apps/browser/src/auth/popup/login/extension-login.service.ts new file mode 100644 index 00000000000..b93ce72c9d5 --- /dev/null +++ b/apps/browser/src/auth/popup/login/extension-login.service.ts @@ -0,0 +1,3 @@ +import { DefaultLoginService, LoginService } from "@bitwarden/auth/angular"; + +export class ExtensionLoginService extends DefaultLoginService implements LoginService {} diff --git a/libs/auth/src/angular/login/login.component.ts b/libs/auth/src/angular/login/login.component.ts index ecefee18ee4..75afd81dd46 100644 --- a/libs/auth/src/angular/login/login.component.ts +++ b/libs/auth/src/angular/login/login.component.ts @@ -24,6 +24,7 @@ import { EnvironmentService } from "@bitwarden/common/platform/abstractions/envi import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; +import { SyncService } from "@bitwarden/common/platform/sync"; import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; import { UserId } from "@bitwarden/common/types/guid"; import { @@ -104,6 +105,7 @@ export class LoginComponentV2 implements OnInit, OnDestroy { private policyService: InternalPolicyService, private registerRouteService: RegisterRouteService, private router: Router, + private syncService: SyncService, private toastService: ToastService, ) { this.clientType = this.platformUtilsService.getClientType(); @@ -166,8 +168,11 @@ export class LoginComponentV2 implements OnInit, OnDestroy { this.loginEmailService.clearValues(); await this.router.navigate(["update-temp-password"]); } else { - // TODO-rr-bw: handle desktop specific - // TODO-rr-bw: handle browser specific + // Browser/Desktop specific (start) + if (this.clientType === ClientType.Browser || this.clientType === ClientType.Desktop) { + await this.syncService.fullSync(true); // TODO-rr-bw: check -> browser uses `await` and desktop uses `return`. Why? + } + // Browser/Desktop specific (end) // Web specific (start) await this.goAfterLogIn(response.userId);