Directing user to login page

I have used deeplink to create link for some pages in my application however if the user is not signed in that page doesn’t open and there is 500 error in the browser. Can you please how can I direct user to sign-in page when the user is not signed in?
2 answers

Hi Nidhi,

Contrary to what Rene is advising, you do not have to enable anonymous users to redirect users to the login page. In fact, the redirect should be handled automatically by the deeplink module.
By default, if a user is not logged in they will be redirected to “/login.html” which is the standard Mendix login page.
If you want to send users to a different address (for example if using SSO) then you need to set the constant Deeplink.LoginLocation 
See this link for more details



I assume you have anonymous users enabled. If not, you need to allow anonymous users.

Then; in the deeplink config, allow anonymous users to use the deeplink. The microflow executed by the deeplink should have a check whether it is executed by an anonymous user $currentUser/IsAnonymous if true redirect to login, otherwise execute deeplink as normal.