1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

two step login page

This commit is contained in:
Kyle Spearrin
2016-09-21 11:35:24 -04:00
parent 32d459159c
commit 8a3a981ac1
7 changed files with 64 additions and 30 deletions

View File

@@ -21,9 +21,7 @@
if (response.profile) {
userService.setUserId(response.profile.id, function () {
userService.setEmail(response.profile.email, function () {
syncService.fullSync(function () {
$rootScope.$broadcast('syncCompleted');
});
syncService.fullSync(function () { });
deferred.resolve(response);
});
});
@@ -44,7 +42,7 @@
var request = new TokenTwoFactorRequest(code);
var deferred = $q.defer();
apiService.auth.postTokenTwoFactor(request, function (response) {
apiService.postTokenTwoFactor(request, function (response) {
if (!response || !response.token) {
deferred.reject();
return;
@@ -53,6 +51,7 @@
tokenService.setToken(response.token, function () {
userService.setUserId(response.profile.id, function () {
userService.setEmail(response.profile.email, function () {
syncService.fullSync(function () { });
deferred.resolve(response);
});
});