question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

[ios] "Choose My Own Password" not calling onChange

See original GitHub issue

šŸ› Bug Report

When you have an input with secureTextEntry the iOS Strong Password dialog pops up and it changes the text to the generated password. This works as expected and onChange is called, but when you press Choose My Own Password (picture below), it doesnā€™t call onChange.

I saw #21261 was closed because it didnā€™t follow the format, and I couldnā€™t find another issue created for this

To Reproduce

  1. Have a <TextInput /> with secureTextEntry on iOS 12+
    • It is also helpful to have console.log on onChange and onChangeText to see what is called
  2. Tap it, this should bring up the Strong Password popup
  3. Press Choose My Own Password
  4. The text changes visually, but it does not call onChange or onChangeText

Expected Behavior

Pressing Choose My Own Password calls onChange and onChangeText with an empty string. That way we know that the user is no longer using the secure password.

Code Example

https://snack.expo.io/@johnkahn/choose-my-own-password

Cannot be run on the simulator, must be run from an iPhone iOS 12+ with Autofill Passwords turned on in the Settings.

Environment


  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
      Memory: 41.62 MB / 16.00 GB
      Shell: 3.0.0 - /usr/local/bin/fish
    Binaries:
      Node: 11.10.1 - /usr/local/bin/node
      npm: 6.7.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:32 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
BrandonMathiscommented, Jul 9, 2020

I feel this issue should be bumped up in priority.

Promoting the use of security-minded features is awesome but not calling the onChangeText with "" as the value when the user explicitly opts out of using iOSā€™s password generation feature can result is major issues with application internal state.

If my Input field is updating component state when onChangeText is fired, I would expect this event to fire when the user opts out of the iOS secure password feature because the Input field goes from yellow with auto-generated password filled back to itā€™s original styles with no text in the input.

Please reconsider the priority of this and respect Appleā€™s implementation of auto-gen password! I have no way to clear out auto-generated password from component state even after the user explicitly opted out of using an auto-generated password.

5reactions
hoanghuy0604commented, Sep 26, 2019

I have this problem too

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatically fill in strong passwords on iPhone - Apple Support
Get a strong password that's easy to type: Tap Other Options, then tap Easy to Type. Make up your own password: Tap Other...
Read more >
iOS 12 Suggested strong password textfield delegate callback ...
I'm not to familiar with the delegate for "Use String password" but if the user is choosing their own password you need to...
Read more >
Change Users' Passwords - Auth0
If your application uses an interactive password reset flow through the Authentication API, make a POST call. In the email field, provide the...
Read more >
How to change your Apple ID password - The Verge
On your iPad, iPhone, or Apple Watch, go to Settings, tap on your name at the top, and choose Password & Security. Choose...
Read more >
Change the phone number on your account & how it's used
Important: It may take a week before you can use your new phone number to verify it's you for sensitive actions like changing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found