mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Added two factor flow into identity login
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
.module('bit.accounts')
|
||||
|
||||
.controller('accountsLoginTwoFactorController', function ($scope, $state, authService, toastr, utilsService,
|
||||
$analytics, i18nService) {
|
||||
$analytics, i18nService, $stateParams) {
|
||||
$scope.i18n = i18nService;
|
||||
$scope.model = {};
|
||||
utilsService.initListSectionItemListeners($(document), angular);
|
||||
$('#code').focus();
|
||||
|
||||
var email = $stateParams.email;
|
||||
var masterPassword = $stateParams.masterPassword;
|
||||
|
||||
$scope.loginPromise = null;
|
||||
$scope.login = function (model) {
|
||||
if (!model.code) {
|
||||
@@ -15,7 +18,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.loginPromise = authService.logInTwoFactor(model.code);
|
||||
$scope.loginPromise = authService.logIn(email, masterPassword, model.code);
|
||||
$scope.loginPromise.then(function () {
|
||||
$analytics.eventTrack('Logged In From Two-step');
|
||||
$state.go('tabs.vault', { animation: 'in-slide-left', syncOnLoad: true });
|
||||
|
||||
Reference in New Issue
Block a user