index.html to login.html not working

Hi,   I have a problem with the redirect from index.html to login.html. The redirect to login.html by cookie is not working and the SSO on SAP. In other apps this same setup works fine.   Can someone give me a push in the right direction ? Thanks! Onco ================== in de index.html the cookie for the login html is being set: <script>             document.cookie = "originURI=/login.html"; </script>  The cookie has been created: But the login.html page is not being triggert/opened. login.html: <!doctype html> <html>     <head>         <script>             if (location.hostname === "localhost" || location.hostname === "") {                 window.location.assign("/login-local.html");             } else {                 window.location.assign("/xsauaalogin/");             }         </script>     </head> </html>  
1 answers

Hi Onco,

Your script part looks perfect, indeed this should trigger the Mendix Client framework to redirect to login.html when no session exists.

document.cookie = "originURI=/login.html";


I can think of the following reasons breaking the rule:

  • Anonymous users are allowed in the application, then the user will never be forwarded to a login page (disable anonymous users)
  • The browser's cache is serving you an older version of the index.html (try incognito window)
  • The Javascript contains errors, and it doesn't reach this part of the code (check browser's console for errors)
  • The user is actually not on index.html, but using index3.html or something (delete all other index-files)

Hopefully it was one of these!

If not, please share the full content of index.html