Login redirects for SSO flow do not redirect the user back to the originally intended page

Summary

When using SSO (login times out every workday for me), attempting to access a Gitlab URL while logged out redirects to login flow which does not subsequently redirect back to the originally intended URL.

This causes a bit of time wastage every day due to having to find the original link again e.g. on our issue tracker and clicking it again.

Steps to reproduce

  • Uses is logged out
  • User clicks on some off-Gitlab link to Gitlab resource e.g. merge request

What is the current bug behavior?

  • User clicks Gitlab resource URL while logged out e.g. merge request
  • User is redirected to login flow
  • User logs in
  • User is redirected to organization's Gitlab homepage.

What is the expected correct behavior?

  • User clicks Gitlab resource URL while logged out e.g. merge request
  • User is redirected to login flow
  • User logs in
  • User is redirected to originally intended resource address.