From 0e4437722b062e7d5f2ecc9cd68ac87759fadc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 20 Sep 2016 11:46:05 +0200 Subject: [PATCH] Allow to force re-login through url --- app/coffee/modules/auth.coffee | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/coffee/modules/auth.coffee b/app/coffee/modules/auth.coffee index a2e1df0c..def65a3c 100644 --- a/app/coffee/modules/auth.coffee +++ b/app/coffee/modules/auth.coffee @@ -37,12 +37,13 @@ class LoginPage constructor: (currentUserService, $location, $navUrls, $routeParams) -> if currentUserService.isAuthenticated() - url = $navUrls.resolve("home") - if $routeParams['next'] - url = $routeParams['next'] - $location.search('next', null) + if not $routeParams['force_login'] + url = $navUrls.resolve("home") + if $routeParams['next'] + url = decodeURIComponent($routeParams['next']) + $location.search('next', null) - $location.path(url) + $location.url(url) module.controller('LoginPage', LoginPage)