Page MenuHomePhabricator

[native] Add password autofill support to PasswordSelection
ClosedPublic

Authored by ashoat on May 26 2023, 11:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 16, 1:52 AM
Unknown Object (File)
Sun, May 5, 5:03 PM
Unknown Object (File)
Sun, May 5, 12:07 PM
Unknown Object (File)
Sun, Apr 28, 9:05 PM
Unknown Object (File)
Apr 20 2024, 7:04 AM
Unknown Object (File)
Apr 4 2024, 9:34 PM
Unknown Object (File)
Apr 4 2024, 9:34 PM
Unknown Object (File)
Apr 4 2024, 9:33 PM
Subscribers

Details

Summary

This diff lets the user skip entering the password again for the "Confirm password" TextInput if the primary TextInput was autofilled.

Unfortunately this has to be different for iOS and Android. It's particularly important on Android, where for some reason the password autofill prompt doesn't even appear for the "Confirm password" TextInput.

  1. For iOS, we do what we currently do in RegisterPanel. We listen for onKeyPress events, and when we get a "key press" that is multiple characters we know that's a password autofill. iOS triggers onKeyPress like this for password autofill, but NOT for paste.
  2. On Android, onKeyPress is not triggered when a password is autofilled. Instead, we look for an onChangeText event that increases the length of the text by more than one character. This will trigger for paste events as well as for password autofill.

In both cases, we only modify the "Confirm password" TextInput if it's empty at the time the primary TextInput is modified.

Test Plan

I tested release builds on my physical iOS device and two physical Android devices (Pixel 3 running Android 12 and Pixel 6a running Android 13) with the 1Password app

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable