Skip to content

First logout the user and only then show the alert#2

Open
Turrentianos wants to merge 4 commits into
masterfrom
fix-relogout-when-multiple-tabs-open
Open

First logout the user and only then show the alert#2
Turrentianos wants to merge 4 commits into
masterfrom
fix-relogout-when-multiple-tabs-open

Conversation

@Turrentianos
Copy link
Copy Markdown
Collaborator

@Turrentianos Turrentianos commented May 14, 2024

The alert was pausing the script which could cause the user to be logged out after just logging in. Concretely if you have multiple tabs open and your session expires then a pop up is shown in all the open redmine tabs. From this state two issues can occur:

  1. If you proceed by reloading the page then you are redirected to the same page with the same notification and are not redirected to the websso to login.
  2. If you press okay on the alert and then refresh you can log in again but once you press okay on the alert of another tab you are logged out again.

These two problems are caused because the alert actually halts the execution of the script. This caused the script to only log out the user after they press okay on the alert.

This pr solves the described problems by first logging the user out (in another iframe) and then showing the alert. If the page is not refreshed the alert is shown again after 1 hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant