1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

[Reset Password v1] Refactor ForcePasswordReset flow (#2063)

* [Reset Password v1] Refactor ForcePasswordReset flow

* Update jslib
This commit is contained in:
Vincent Salucci
2021-09-24 08:34:09 -05:00
committed by GitHub
parent f1dcbdb6de
commit c1613f79cd
4 changed files with 6 additions and 33 deletions

View File

@@ -10,7 +10,6 @@ import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.se
import { StateService } from 'jslib-common/abstractions/state.service';
import { StorageService } from 'jslib-common/abstractions/storage.service';
import { SyncService } from 'jslib-common/abstractions/sync.service';
import { UserService } from 'jslib-common/abstractions/user.service';
import { LoginComponent as BaseLoginComponent } from 'jslib-angular/components/login.component';
@@ -24,14 +23,10 @@ export class LoginComponent extends BaseLoginComponent {
protected stateService: StateService, protected environmentService: EnvironmentService,
protected passwordGenerationService: PasswordGenerationService,
protected cryptoFunctionService: CryptoFunctionService, storageService: StorageService,
syncService: SyncService, private userService: UserService) {
syncService: SyncService) {
super(authService, router, platformUtilsService, i18nService, stateService, environmentService, passwordGenerationService, cryptoFunctionService, storageService);
super.onSuccessfulLogin = async () => {
await syncService.fullSync(true).then(async () => {
if (await this.userService.getForcePasswordReset()) {
this.router.navigate(['update-temp-password']);
}
});
await syncService.fullSync(true);
};
super.successRoute = '/tabs/vault';
}