Skip to content

Fix `Remember me` omniauth

Eduardo Sanz García requested to merge eduardosanz/dual-checkbox-problem into master

What does this MR do and why?

In the sign-in page, the ID of the Remember me checkbox element was duplicated. The same ID, remember_me, was used for the main login (upper section) and the omniauth logins (lower section). This created a couple of undesired side-effects:

  1. Selecting on the lower Remember me checkbox, checked the upper checkbox (main login).
  2. More importantly, the Remember me was broken because it didn't add the parameter remember_me=1 to the action path of the form surrounding the ommiauth logins.

This commit fixes the issue by replacing the remember_me ID to a more specific name, remember_me_omniauth, for the omniauth logins.

Closes #385419 (closed)

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Enable LDAP login: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/ldap.md
  2. Go to the sign-in page: https://gdk.test:3443/users/sign_in
  3. Toggle the lower Remember me checkbox.
  4. The upper Remember me checkbox should remain unchecked.
  5. A remember_me=1 parameter should be added to the <form>'s action attribute connected to the omniauth buttons.

Screen_Recording_2023-03-21_at_12.05.27

MR acceptance checklist

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

Edited by Eduardo Sanz García

Merge request reports