GitLab Pages with only project member visibility will return 401 Unauthorised if you start 2 requests at the very same moment from same client
Summary
From the discussion gitlab#342587 (comment 1234111548) : One very rare scenario is pending where user tries to access private pages url in two different tabs at the same moment. One of the tab will result in 401 after submitting the login credentials.
Pages stores state
value in session. When user tried to access private pages url in two different tabs at the same moment which is not already authenticated, two different state
values are returned for each tab. But in pages session only one most recent state
value will be stored for given client. Because of that after submitting login credentials one tab will result in 401 unauthorised.
Possible fixes
This issue is majorly for documenting the scenario, as there is no real solution to store two different sessions for single client.