Stateless runtime does not transfer session from anonymous user to logged in user in Mx 7.5.1

2
We recently converted our project from 6.10.3 to 7.5.1 and our custom login flow has stopped working. After much investigation we have found in the release notes : https://docs.mendix.com/releasenotes/desktop-modeler/known-issues and https://docs.mendix.com/refguide/moving-from-6-to-7 that the stateless runtime does not transfer the seesion when using a custom login java action. We need to use the custom login, as users are only allowed to login after being authenticated against our IBMI server using a rest service.   Does anyone know a workaround?
asked
3 answers
8

Hi Ryan, I don't know exactly why you need the session info, but I assume you mean a custom Java login handler or like the After Sign-In microflow for Mendix 6 and earlier. I suggest to take a look at the Sign-in microflow for Mx7 from the appstore.

A complete other custom authentication mechanism without the usage of the custom login Java handler is the SAML module or Deeplink module. It usages a Request Handler in Java to authenticate the user and than redirects the user to the Mendix app.

answered
0

@Joel,

Perhaps i should provide more details, we are not using the sign-in microflow, rather we have created a guest page which allows the user to enter their employee code and password. When the user clicks a standard microflow button "login" we call a flow which first checks their username and password against credentials stored on a IBMI server using a rest call.

If the web service returns true, we log the user in via a java action which uses the standard : Core.login(Username,Password,getContext().getSession().getId().toString());

after which we call the ShowHome action in the flow, at which point the user should be redirected to the default home page based on their user role. (I have tried using the URL redirect here but same result)

However after showhome/URL redirect, absolutely nothing happens, the user is still on the guest login page.

It is integral we authenticate the user with this webservice ( this is a system used to sell insurance policies and therefore needs to be verified against the servers)

 

I have tried using the sign-in for mendix 7, but no matter what i do in it the user is not redirected to their home  page after login. The SAML module would not work for us in this situation, but i have not yet tried the deeplink approach.

answered
0

@Ryan Someone asked this exact same question some time ago, you should try finding that thread and contact the OP there.

answered