1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

2fa support

This commit is contained in:
Kyle Spearrin
2018-02-01 22:59:04 -05:00
parent 0328977c14
commit fd15c09406
14 changed files with 681 additions and 28 deletions

View File

@@ -9,6 +9,8 @@ import { Router } from '@angular/router';
import { Angulartics2 } from 'angulartics2';
import { ToasterService } from 'angular2-toaster';
import { AuthResult } from 'jslib/models/domain/authResult';
import { AuthService } from 'jslib/abstractions/auth.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
@@ -19,7 +21,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
export class LoginComponent {
email: string = '';
masterPassword: string = '';
formPromise: Promise<any>;
formPromise: Promise<AuthResult>;
constructor(private authService: AuthService, private router: Router, private analytics: Angulartics2,
private toasterService: ToasterService, private i18nService: I18nService) { }
@@ -47,7 +49,6 @@ export class LoginComponent {
if (response.twoFactor) {
this.analytics.eventTrack.next({ action: 'Logged In To Two-step' });
this.router.navigate(['2fa']);
// TODO: pass 2fa info
} else {
this.analytics.eventTrack.next({ action: 'Logged In' });
this.router.navigate(['vault']);