SSO not redirecting after user logs out

0
I have SSO set up and I want to force this as the only way users can log in when they go to myapp.com    SO, I copied the index.html and renamed it index4.html and made this this SAML20.SSOLandingPage   I changed index.html to have just this   <!doctype html> <html>     <head>     <meta http-equiv="refresh" content="0;URL=/SSO/" />     </head>     <body>     </body> </html>   And both the SAML20.DefaultLoginPage and SAML20.DefaultLogout Page are set to “index.html:. When i visit myapp.com, it redirects to /SSO/ just fine It then redirects to the landinf page “index4.html” which is perfect.   The problem is this final landing page “index4.html” is what people are bookmarking (not the root “/” url), obviously because people never type things into their bookmarks, they just add it after they go to a site.   So the next day, they load the page and they’re loading index4.html and their session has expired. Instead of the “index,html” being called, they’re getting a generic looking username/password page. Now I DELETED the “login.html” page. They shouldn’t be seeing “login.html” AT ALL, but they are. This “DefaultLoginPage” setting should be directing them to “index.html” which should redirect to /SSO/ but it isn’t doing that. They’re getting the contents of the OLD “login.html” which SHOULDNT EVEN EXIST.   Does anyone know why?   EDIT: Screenshot of the login screen that is showing up when I go to index4.html index4 contents   <!doctype html> <html>     <head>         <script type="text/javascript">             // Redirect to unsupported browser page if opened from browser that doesn't support async/arrow functions             try {                 eval("async () => {}");             } catch (error) {                 var homeUrl = window.location.origin + window.location.pathname;                 var appUrl = homeUrl.slice(0, homeUrl.lastIndexOf("/") + 1);                 window.location.replace(appUrl + "unsupported-browser.html");             }         </script>         <meta charset="utf-8">         <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">         <title>Mendix</title>         <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">         <meta name="apple-mobile-web-app-capable" content="yes">         <link rel="stylesheet" href="theme.compiled.css?638012519375641509">         <!-- ICONS EXAMPLE -->         <!-- iPhone retina icon (iOS < 7) -->         <!-- <link href="resources/ios/icons/apple-touch-icon-precomposed-114x114.png" sizes="114x114" rel="apple-touch-icon-precomposed"> -->         <!-- STARTUP IMAGES -->         <!-- <link href="resources/ios/startup/apple-touch-startup-image-1496x2048.png" media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" rel="apple-touch-startup-image"> -->     </head>     <body dir="ltr">         <div id="content"></div>         <script>             dojoConfig = {                 baseUrl: "mxclientsystem/dojo/",                 cacheBust: "638012519375641509",                 rtlRedirect: "index-rtl.html"             };         </script>         <script src="mxclientsystem/mxui/mxui.js?638012519375641509"></script>     </body> </html>
asked
5 answers
2

In your resources folder you have a directory SAML with a directory templates. You might want to take a look at this file: saml2-discovery-binding.vm. Could it be that you are seeing that?
You can offcourse make some adjustments here but do note that when you update the module all is gone again and you would again need to adjust.

Regards,

Ronald

 

answered
2

Hey Brian,

The .html pages you are changing are from deployment so no matter how many times you change your .html page, it will get over written as soon as you deploy your app. 

I suggest you to please refer to the question..

https://forum.mendix.com/link/questions/118912

Here you'll see what you should do. 

I have answered there as well, so, you'll know what to do.

Hope it helps !

answered
1

I've ran into similar issues while i was working on a PWA project. It might have something to do with caching or the old deployment folder in the cloud. What i do in these cases is redeploy to the cloud, and increase the version by 1. This usually helps in these kind of cases.

GL

answered
0

I’m going to re-install the SAML2.0 module completely from scratch and see if that helps. Honestly, when i run into issues where things aren’t working properly, blowing away a module and re-installing it something is the only thing that seems to help

answered
0

I got it working guys. The answer was in clues provided by both Ruud and Rishabh. My problem is that I copied all the index*.* and login*.* files from the theme/web folder of a previous project that I needed this “forced SSO” working on before. The problem is…. that project I copied from was 8,8 and I’m working now in 9.9

 

Ruud made me look long and hard at the landing page (index4.html) code and then I looked at the original index.html landing page template in the “runtemplates” folder suggested by Rishabn, a folder I didn’t know existed. The code was different. So I copied the code from the runtemplates “index.html” landing page template into my own “index4.html’ template and guess what? It worked. Now when i’m logged out and navigate to index4.html, it redirects me to /SSO. (probably via way of my DefaultLoginPage).

 

Thanks for the help guys

 

MORAL OF THE STORY: If you’re modifying any html files directly, don’t just REPLACE them with files from a previous version and assume they’ll work. Leave the files because the code is probably specific to the version of Mendix. My 9.7 html landing page was referncing code from an 8.8 file and it probably cause a problem. Stick with the correct versions (from the runtemplates directory) and modify them only as needed instead of just replacing them.

answered