diff --git a/src/app/accounts/login.component.ts b/src/app/accounts/login.component.ts index 1d57749a..c144476e 100644 --- a/src/app/accounts/login.component.ts +++ b/src/app/accounts/login.component.ts @@ -46,7 +46,7 @@ export class LoginComponent { const response = await this.formPromise; if (response.twoFactor) { this.analytics.eventTrack.next({ action: 'Logged In To Two-step' }); - this.router.navigate(['twoFactor']); + this.router.navigate(['2fa']); // TODO: pass 2fa info } else { this.analytics.eventTrack.next({ action: 'Logged In' }); diff --git a/src/app/accounts/two-factor.component.html b/src/app/accounts/two-factor.component.html new file mode 100644 index 00000000..0583c1b4 --- /dev/null +++ b/src/app/accounts/two-factor.component.html @@ -0,0 +1,24 @@ +
diff --git a/src/app/accounts/two-factor.component.ts b/src/app/accounts/two-factor.component.ts new file mode 100644 index 00000000..e7cc670e --- /dev/null +++ b/src/app/accounts/two-factor.component.ts @@ -0,0 +1,55 @@ +import * as template from './two-factor.component.html'; + +import { + Component, +} from '@angular/core'; + +import { Router } from '@angular/router'; + +import { Angulartics2 } from 'angulartics2'; +import { ToasterService } from 'angular2-toaster'; + +import { RegisterRequest } from 'jslib/models/request/registerRequest'; + +import { ApiService } from 'jslib/abstractions/api.service'; +import { AuthService } from 'jslib/abstractions/auth.service'; +import { CryptoService } from 'jslib/abstractions/crypto.service'; +import { I18nService } from 'jslib/abstractions/i18n.service'; + +@Component({ + selector: 'app-two-factor', + template: template, +}) +export class TwoFactorComponent { + token: string = ''; + remember: boolean = false; + providerType: number; + email: string; + masterPassword: string; + formPromise: Promise