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)
Tue, Mar 12, 1:07 PM
Unknown Object (File)
Feb 21 2024, 12:58 AM
Unknown Object (File)
Feb 21 2024, 12:37 AM
Unknown Object (File)
Feb 20 2024, 9:58 PM
Unknown Object (File)
Feb 20 2024, 10:03 AM
Unknown Object (File)
Jan 10 2024, 8:02 AM
Unknown Object (File)
Dec 30 2023, 10:43 PM
Unknown Object (File)
Dec 16 2023, 1:10 AM
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