From 8b88b344752e09cf6e2b82133e44d925c9cf470c Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Sun, 8 Feb 2015 21:45:30 +0100 Subject: [PATCH] correctly redirect after authentication --- public/js/controllers/authCtrl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/controllers/authCtrl.js b/public/js/controllers/authCtrl.js index a167ecb309..6bdd4c0b83 100644 --- a/public/js/controllers/authCtrl.js +++ b/public/js/controllers/authCtrl.js @@ -15,7 +15,7 @@ angular.module('habitrpg') var runAuth = function(id, token) { User.authenticate(id, token, function(err) { - $window.location.href = '/'; + $window.location.href = ('/' + window.location.hash); }); }; @@ -57,7 +57,7 @@ angular.module('habitrpg') $scope.playButtonClick = function(){ window.ga && ga('send', 'event', 'button', 'click', 'Play'); if (User.authenticated()) { - window.location.href = '/#/tasks'; + window.location.href = ('/' + window.location.hash); } else { $modal.open({ templateUrl: 'modals/login.html'