1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

Merge branch 'master' of https://github.com/bitwarden/browser into feature/safari-webext

# Conflicts:
#	src/background/runtime.background.ts
This commit is contained in:
Hinton
2020-12-11 14:33:46 +01:00
12 changed files with 82 additions and 16 deletions

View File

@@ -25,6 +25,7 @@ import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
import { TwoFactorComponent as BaseTwoFactorComponent } from 'jslib/angular/components/two-factor.component';
import { PopupUtilsService } from '../services/popup-utils.service';
import { BrowserApi } from '../../browser/browserApi';
const BroadcasterSubscriptionId = 'TwoFactorComponent';
@@ -37,7 +38,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
constructor(authService: AuthService, router: Router,
i18nService: I18nService, apiService: ApiService,
platformUtilsService: PlatformUtilsService, syncService: SyncService,
platformUtilsService: PlatformUtilsService, private syncService: SyncService,
environmentService: EnvironmentService, private ngZone: NgZone,
private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef,
private popupUtilsService: PopupUtilsService, stateService: StateService,
@@ -80,6 +81,20 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
this.popupUtilsService.popOut(window);
}
}
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
if (qParams.sso === 'true') {
super.onSuccessfulLogin = () => {
BrowserApi.reloadOpenWindows();
const thisWindow = window.open('', '_self');
thisWindow.close();
return this.syncService.fullSync(true);
};
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
}
});
}
ngOnDestroy() {