Does your index.html contain a script to set a cookie for originURI?
You might want to take out that entire script tag.
Is there any final though on this, I’m seeing the same behavior after creating a custom login page.
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.
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.