diff --git a/app/portainer/views/auth/auth.html b/app/portainer/views/auth/auth.html index 62c26d8b6..9c0ecfc2e 100644 --- a/app/portainer/views/auth/auth.html +++ b/app/portainer/views/auth/auth.html @@ -9,7 +9,7 @@ -
+
@@ -49,6 +49,13 @@
+
+
+
+ Connecting with OAuth +
+
+
diff --git a/app/portainer/views/auth/authController.js b/app/portainer/views/auth/authController.js index 8f281a170..43aaebb08 100644 --- a/app/portainer/views/auth/authController.js +++ b/app/portainer/views/auth/authController.js @@ -8,7 +8,8 @@ angular.module('portainer.app').controller('AuthenticationController', ['$q', '$ }; $scope.state = { - AuthenticationError: '' + AuthenticationError: '', + isInOAuthProcess: true }; $scope.authenticateUser = function() { @@ -89,6 +90,7 @@ angular.module('portainer.app').controller('AuthenticationController', ['$q', '$ if ($stateParams.logout || $stateParams.error) { Authentication.logout(); $scope.state.AuthenticationError = $stateParams.error; + $scope.state.isInOAuthProcess = false; return; } @@ -106,6 +108,8 @@ angular.module('portainer.app').controller('AuthenticationController', ['$q', '$ var code = urlHelper.getParameter('code'); if (code) { oAuthLogin(code); + } else { + $scope.state.isInOAuthProcess = false; } } @@ -117,6 +121,7 @@ angular.module('portainer.app').controller('AuthenticationController', ['$q', '$ }) .catch(function error() { $scope.state.AuthenticationError = 'Failed to authenticate with OAuth2 Provider'; + $scope.state.isInOAuthProcess = false; }); }