bitwarden / clients

Bitwarden client apps (web, browser extension, desktop, and cli).
https://bitwarden.com
Other
8.65k stars 1.14k forks source link

[PM-4917, PM-8707, PM-9119] Persist login email memory through 2fa on browser #9811

Open jlf0dev opened 4 days ago

jlf0dev commented 4 days ago

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-4917 https://bitwarden.atlassian.net/browse/PM-8707 https://bitwarden.atlassian.net/browse/PM-9119

📔 Objective

We've had issues with retaining the email through the different screens of the login flow on browser. This manifested in two ways:

  1. If you returned from 2FA, you had to re-enter your email.
  2. If you returned from the Hint page, you had to re-enter your email.

This fix separates removes clearValues from saveEmailSettings on the LoginEmailService. I then have added manual calls to clear the values later. It is important to clear these values as soon as we don't need them since directly adding an account will then autofill whatever was left in memory. The functionality to avoid this autofill if we're in addingAccount mode is only included on the call to get the stored email from the LoginEmailService.

📸 Screenshots

⏰ Reminders before review

🦮 Reviewer guidelines

github-actions[bot] commented 4 days ago

Logo Checkmarx One – Scan Summary & Details3051c915-f2ff-47c3-b1d1-773e569c77d5

No New Or Fixed Issues Found