How to fix app starting with Anonymous user role after successfull SAML authentication when cached session exists.

0
Hello, I'm encountering an issue with the SAML module (version 3.6.11). I have implemented SAML SSO in my app, and it appeared to be functioning properly. However, I discovered that in certain instances, app sessions are closing several hours after sign-in. When this occurs, attempting to sign in again via SSO results in being redirected to the custom login page instead of the SSOLandingPage after a successful SSO authentication. Below is a live log output: 14:30:11APP INFO SAML_SSO: Assertion attributes Email:********@*****.com 14:30:11APP FullName:********* 14:30:11APP Name:**** 14:30:11APP INFO SAML_SSO: Success: Successful sign on: **** I have confirmed that SSO authentication was indeed successful using the SAML_Tracer Chrome extension. Both the Service Provider (SP) and Identity Provider (IdP) identified the user ****, who has the User user role.   Using Chrome developer tools, I investigated the issue and found that when this occurs, a session key is created in the local storage cache. [EDITED] Below is the Session key value.    And the app starts with use of this cached session data, resulting in an Anonymous user role. Below is a screenshot of the Dev Tools Network Tab: Once this happens, attempting to sign in to my app via SSO is always redirected to the custom login page because it is anonymous. It should be the SSOLandingPage.   However, if I delete this session key in the local storage cache from the Developer Tools Application tab, signing in to my app via SSO is successful, and the user is directed to the SSOLandingPage. Below is a screenshot of the Dev Tools Network Tab when sign-in is successfull:   This behavior continues and re-attempt to sign-in is always sucessfull until an unexpected session close occurs and the user is redirected to the custom login page. At this point, a new session key is created again in the local storage cache.   I have spent a significant amount of time researching Mendix Doc and Forum posts but have not been able to find possible causes. I appreciate any suggestions on how to fix this.
asked
0 answers