login.html

0
We are using the LoginForm widget in our project to create a login page for the application which is presented if you browse to the root of the application. However, under some circumstances when a user is logged in and they either navigate using the back or forward buttons of the browser, or if the user session is ended (for instance by restarting the server), in some cases the login.html page is displayed. I don't really understand the underlying reason why it is displayed and I don't see any obvious documentation on this, so I'm wondering if someone can explain this to me, also so that I can try to prevent it when possible. Thanks in advance for your help!
asked
4 answers
3

Does your index.html contain a script to set a cookie for originURI?

originURI=/login.html

You might want to take out that entire script tag. 

answered
1

We have the same thing with a app we made. I'm also trying to figure out why this is happening. What i found so far:

- Our default homepage for anonymous is the custom login page. Default homepage for user is a microflow (with some custom actions, ends in opening the homepage page). 

- When i open the app (killed it before) the apps try to reuse the old session (even when its from yesterday). Its entering the default homepage for the user with the user as current user. But directly at the start of the microflow the app will show the wrong login screen. From there i can still walk through the microflow with debugging. The microflow ends with a show page action but this is never done because the app already is showing the wrong login screen. 

 

So for me it looks like it has something to do with the old session. But i don't know why. Looks like the app does not know what to do and falls back at the default (not custom) login page. 

answered
0

As I understand correctly you created a login page yourself. not using the default login.html?

In that case; I guess it is caused because mendix remembers the last 5 visited pages. And the login page is one of them.

When the session ends a user needs to login again. So in that case it sounds pretty normal to me that the login page is showed.

 

answered
0

Is there any final though on this, I’m seeing the same behavior after creating a custom login page.

Thanks, Max

answered