Skip to content

Fix: Remember me cookie not set when bypassing

What does this MR do and why?

🛠 with at Siemens

Screenshots or screen recordings

This MR only contains backend -related changes.

How to set up and validate locally

The following steps are partially taken from the section Steps to reproduce included in the issue description

  1. Pick a user account for testing and enable 2FA for the specific user
  2. Setup omniauth provider, e.g. the omniauth provider auth0
  3. Configure the omniauth provider to bypass two factor, i.e. allow_bypass_two_factor: ['auth0'].
  4. Open a new private / incognito browser window and go to http://gdk.test:3000
  5. IMPORTANT Select the checkbox "Remember me" below the button to initiate sign in flow of the omniauth provider, see screenshot below
  6. Click the omniauth provider button and follow the sign in flow of the omniauth provider
  7. After the omniauth sign in flow, you should be redirected to the GitLab dashboard screen and the cookie remember_user_token should be present, see other screenshot below grafik
  8. Restart your browser or delete the _gitlab_session session cookie
  9. Go to http://gdk.test:3000
  10. You should see the GitLab dashboard screen without the need for signing into GitLab (because of the cookie remember_user_token is still set)

When performing these steps on the branch master, then the cookie remember_user_token will not be present after signing in with the omniauth provider.

Note: In Firefox, multiple private windows do not have individual sessions. Multiple private windows reuse the same (private) session, see https://support.mozilla.org/en-US/questions/1269006 .

Todos

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Relates to Remember me cookie not set when bypassing 2fa i... (#370083 - closed)

Edited by Gerardo Navarro

Merge request reports

Loading