<html>
  <head>
    <script>
      var redirect_function = function(){
        var full_error_message = document.getElementById("id_complete_error_p").textContent;
        var full_url = full_error_message.split(": ")[1];
        var full_horizon_url_sso = full_url.split("=")[1];
        var horizon_url = full_horizon_url_sso.replace("/auth/websso/", "");
        window.location =  horizon_url;
      };

      document.addEventListener('DOMContentLoaded', function() {
        setTimeout(redirect_function, {{ keystone_federation_oidc_error_page_retry_login_delay_milliseconds }});
      }, false);
    </script>
  </head>
  <body>
    </br>
    <p>It seems that an error happened during the login process.</p>
    <p>You will be redirected again. Wait a few seconds please.</p>
    </br>
    <a id="link_user_manual_redirect" href="#" onclick="redirect_function()">Redirect me now.</a>
    </br>
    </br>
    </br>
    <p id="id_error_p">Error: %s</p>
    <p id="id_complete_error_p">%s</p>
  </body>
</html>
