1
0
mirror of https://github.com/bitwarden/web synced 2025-12-23 11:43:15 +00:00

Use jslib unauthGuard, add lockGuard support (#939)

* Use jslib unauthGuard, add lockGuard support

* bump jslib
This commit is contained in:
Thomas Rittson
2021-04-22 18:13:43 +10:00
committed by GitHub
parent 714a574028
commit 9b38095aba
5 changed files with 11 additions and 40 deletions

View File

@@ -33,13 +33,6 @@ export class LockComponent extends BaseLockComponent {
async ngOnInit() {
await super.ngOnInit();
const authed = await this.userService.isAuthenticated();
if (!authed) {
this.router.navigate(['/']);
} else if (await this.cryptoService.hasKey()) {
this.router.navigate(['vault']);
}
this.onSuccessfulSubmit = () => {
const previousUrl = this.routerService.getPreviousUrl();
if (previousUrl !== '/' && previousUrl.indexOf('lock') === -1) {