Login redirects to previous location do not work when multiple tabs are opened and original session is lost
Summary
Gitlab has serious data loss bug. I've been in the middle of work, with about 20 or so windows and tabs with Gitlab open and accidentally quit my browser. Upon re-launch all windows were showing login form. None of them redirected back to the previously opened location after successful login.
Steps to reproduce
- User opens multiple windows, tabs with Gitlab content.
- User uses 2fa.
- User either closes browser and opens it several days later; or user logged into Gitlab more than week ago and just restarts browser.
- All Gitlab windows will now show login form.
- After logging in, user will be redirected to the /dashboard/activity URL of the instance.
- All previously opened tabs/windows will observe this behavior.
- There is no way to restore Gitlab's windows which were open: Gitlab forces logout on a first reload of the page.
This is serious data loss bug, which I can reproduce on Gitlab.com as well as my instance of Gitlab EE.
What is the current bug behavior?
Gitlab forces re-login and does not redirect to the previous location.
What is the expected correct behavior?
Gitlab should prevent data loss — if login is required — after successful login, redirect back to the previous location.