SAML SSO with hybrid mobile app loads wrong page - Mendix Forum

SAML SSO with hybrid mobile app loads wrong page

0

We're building a online hybrid mobile app. The authentication is done with SAML SSO and the documentation https://docs.mendix.com/howto/mobile/implement-sso-on-a-hybrid-app-with-mendix-and-saml is implemented completely. The SSO works perfect: the ADFS is loaded within the mobile app and the authentication ise executed properly. After the authentication the app should be loaded, but instead of starting the online hybrid mobile navigation profile, the default responsive profile is loaded! 

I've tried to alter the entry.js file to give a deeplink to the SAML: "SSO/login?cont=index.html%3Fprofile%3DHybridPhone" to force the hybrid mobile profile is started which works, but all phonegap javascript libraries aren't available anymore.

Has anyone encountered this issue and what was the solution?

asked
1 answers
2

Hi Joel, the SAML process opens an in-app-browser on top of your app. Once you’re signed in, that in-app-browser should close. You can tell by whether or not the in-app-browser closed by checking whether you have access to the Cordova API. In order for the browser to close properly, the SAML process needs to redirect you correctly to the URL that your hybrid app expects (in order to meet the if condition near the top of the SAML-hybrid code). I’ve seen this process break down when the Mendix app has 2 URLs (a Mendix cloud URL and a custom URL).

So, my question is: are you using a custom URL for your app? And is that custom URL:

  • Used by the hybrid app build files in the environments.json file?
  • Added on the server side to the custom runtime setting ApplicationRootUrl?

If you do both of those things, then the hybrid app will expect a redirect to come back to the custom URL, the Mendix server will use the custom URL in the SAML process, and so everything should work properly.

answered