This is what worked for me:
window.mx.afterLoginAction = () => {
if ( window.location.search.startsWith('?cont=') ) {
window.location = window.mx.homeUrl+decodeURIComponent(window.location.search.substring(6))
} else {
window.mx.redirect(window.mx.homeUrl);
}
}
Hope this helpsHi Sid,
You're correct about using the LoginLocation constant, but the value should be "../login”. Your request handler should support a parameter ("cont” of continue is most used) so the handler knows to redirect the user back to the deeplink module with a user session. The LoginLocation constant should be "../login?cont=” and the deeplink module will paste the requested deeplink at the back.
Maybe a little complex but take a look at the SAML module how it's implemented in the java, because for the SAML module the LoginLocation constant should be “../sso/login?f=true&cont=”
Success!
Here is a detailed solution
:https://medium.com/@abdulmoiz485/resolving-deep-link-issues-in-mendix-a-step-by-step-guide-34b9e5a175c1