index.html to login.html not working

0
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 === "127.0.0.1") {                 window.location.assign("/login-local.html");             } else {                 window.location.assign("/xsauaalogin/");             }         </script>     </head> </html>  
asked
1 answers
2

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

answered