mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
2fa support
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user