fix(web(js)): handle SAML assertion expiration

pull/280/head
Francis Lachapelle 2020-06-05 11:20:23 -04:00
parent cf91b2dcbb
commit 433da56b23
1 changed files with 6 additions and 3 deletions

View File

@ -301,8 +301,8 @@
iframe.on('load', function() {
var $state = $injector.get('$state');
if (response.config.attempt) {
// Already attempted once -- reload page
if (response.config.attempt > 2) {
// Already attempted 3 times -- reload page
angular.element($window).off('beforeunload');
$window.location.href = $window.ApplicationBaseURL + $state.href($state.current);
deferred.reject();
@ -311,7 +311,10 @@
// Once the browser has followed the redirection, send the initial request
$timeout(function() {
var $http = $injector.get('$http');
response.config.attempt = 1;
if (response.config.attempt)
response.config.attempt++;
else
response.config.attempt = 1;
$http(response.config).then(function(response) {
deferred.resolve(response);
});