From cfc15dab379ac4590615d844b8e28931a9d2e952 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Thu, 8 Jun 2017 19:19:33 -0400 Subject: [PATCH] Only store the preAuthUrl if the user is trying to navigate to a non-login/logout state --- awx/ui/client/src/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 856f68f2e7..800846af35 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -364,7 +364,9 @@ var tower = angular.module('Tower', [ if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) { // User not authenticated, redirect to login page - $cookies.put('preAuthUrl', $location.path()); + if (!/^\/(login|logout)/.test($location.path())) { + $cookies.put('preAuthUrl', $location.path()); + } $location.path('/login'); } else { var lastUser = $cookies.getObject('current_user'),