mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.06k stars 2.88k forks source link

[iPad Multi-Window] Biometric screen is still displayed when accessing homepage (resuming FF) #20464

Open abodea opened 4 weeks ago

abodea commented 4 weeks ago

Steps to reproduce

  1. Launch Firefox in multi-window.
  2. Open in window 2 the passwords section and bypass the biometrics.
  3. Minimize window 2 (add window 1 to full screen).
  4. Add window 1 to the background.
  5. Resume window 1 (that will be displayed in full mode).

    Expected behavior

    Firefox homepage should be correctly displayed and no biometrics screens should be displayed.

    Actual behavior

    The biometric screen is still displayed when accessing the homepage (resuming FF)

    Device & build information

    • Device: iPad Pro (16.4.1).
    • Build version: v9000 (42305)
    • First seen version: N/A

      Notes

      Attachments:

https://github.com/mozilla-mobile/firefox-ios/assets/42831109/8b2cca2d-ab0e-4628-95a3-b0263e115448

┆Issue is synchronized with this Jira Task

data-sync-user commented 2 weeks ago

➤ Matt Reagan commented:

Notes: the root issue is that one of the windows is presenting a SensitiveViewController, and when the app is brought to the foreground, even though that specific iPad window may not be visible, we still receive the willEnterForeground notification. This means the authentication code in SensitiveViewController.viewWillAppear() is run, which prompts the user for biometrics. (The reason it prompts is that we automatically set isAuthenticated to false when the app enters the background).

We can try checking the associated window’s activationState, though this might be a change that has larger ramifications.

data-sync-user commented 1 week ago

➤ Matt Reagan commented:

Fix has been merged for this, 128 build.

data-sync-user commented 1 week ago

➤ Andrei Bodea commented:

Verified as fixed on v128 (42711) with iPad Pro (16.4.1).