Login causes "Bad Request"

Suppose an user has an OnDemand session open in their browser, say at the page https://example.com/pun/sys/dashboard/batch_connect/sessions

Suppose the browser is also set with “remember open tabs” at restart. Then they close the browser, some time elapses and then they open their browser again.

The OnDemand tab, instead of reappearing at the previous URL, it goes (maybe by redirect?) to something like https://example.com/dex/auth/ldap/login?back=&state=tvfabht5xgfcqezvlppordach but otherwise shows a normal login page. Suppose the user does not log in immediately, but wait for a while. Unfortunately, that becomes a broken login page: if an user logs in there they receive the following response

and need to login again.

Is there a way to prevent this from happening? Many users don’t read the documentation asking them to go to a fresh https://example.com/ (which redirects to a “fresh” state) before the login, and then think OOD is down, and ask support questions about it, wasting both their time and support time.

Sorry, not really anything you can do. Authentication systems have timeouts for very good reasons so you can’t disable them or similar.

A quick glance at dex documentation seems to indicate that it doesn’t has any redirect capabilities here.

Agreed on that part.

From the symptom perspective, though, can’t we make the HTML of the login page include a javascript redirect to the home page with a frequency same or faster or the timeout, to prevent forcing the user to have to remember to do that? Or by the following you mean that it’s impossible from the OnDemand side without changing the source code of dex too?

After all that page does have the header and footer of OnDemand, so maybe there is way to inject that javascript?

You can try that I guess. I suppose the javascript would have to read interpret the context of the page and then set window.location.href. Might could work, though you’d have to be careful not to redirect on good/valid pages too.