App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-12-15] Unable to use 1Password option for autofill on login

Open isagoico opened this issue 5 years ago • 52 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Navigate to staging.expensify.cash
  2. Right click on the email field
  3. Click on the 1Password option

Expected Result:

Option to select existing accounts should be displayed

Actual Result:

Nothing happens when clicking on the 1Password option

Workaround:

No, unable to use the 1Password extension.

Platform:

Where is this issue occurring?

Web ✔️ iOS Android Desktop App Mobile Web

Version Number: 1.0.75-5

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

image

Expensify/Expensify Issue URL:

View all open jobs on Upwork


From @mallenexpensify https://expensify.slack.com/archives/C01GTK53T8Q/p1625156109326100?thread_ts=1625155719.325000&cid=C01GTK53T8Q

Be able to right click on the Phone or Email box and have a menu option that allows for selecting 1Password. OR, be able to see and click a 1Password icon on the far right of the box. Ideally, once 1P is used for entering the email address, the Password and Two Factor Code on the following page will be autofilled as well.

isagoico avatar Jul 01 '21 18:07 isagoico

Triggered auto assignment to @flodnv (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Jul 01 '21 18:07 MelvinBot

This is because the password forms on this page don't meet best practices for user password forms: https://web.dev/sign-in-form-best-practices/ I believe that it won't detect the form because of this. When I add the password field after the username lastpass detects the inputs and adds the autofill features. So I think it's a detection issue. It would be good to know is this happens on Android and firefox as they use heuristics for detection. I'll test 1Password later to see if it behaves the same.

Can I ask if you've experienced 1Password working with split forms before (slip forms where username and password input appear on different pages or stages? Once we follow best practices there is still a chance they don't implement support for them. An example of split forms is amazon.com etc.

Secondly there is another issue that will appear after this one is fix: I don't think it would be able to chose the right password for you when it does trigger as the login is split across two pages. The password manager doesn't have the context it needs to match a user:pass combo.

I saw another symptom of the same issue before when setting a password, it tries to save the password without a username because it doesn't know what the username is in that context.

If you've implemented an "email first" sign-in flow

The saving issue is with chrome password manager and last pass that I've experienced.

For the initial issue I propose further investigating the limitations of detection in the major password managers. Hopefully once the best practices are implemented the split form will work. Otherwise we might need to change the form depending on the limitation of which one we decide to support. which brings me to the next question. Which managers do you want to support?

Firefox, Chrome, Edge, iOS, Android, Safari, 1Password, LastPass.... the list goes on. I don't see a browserlist query in the project.

For my second issue: I propose adding a hidden username form field in the form to let the manager know what password to fill. I propose also to create another issue to further audit all the password forms in the application to meet best practices e.g. not using placeholders, don't make the user replete themselves (once password managers work correctly).

anthony-hull avatar Jul 02 '21 08:07 anthony-hull

Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Jul 02 '21 09:07 MelvinBot

cc: @iwiznia I think this is an important issue and @anthony-hull has a good proposal.

parasharrajat avatar Aug 13 '21 01:08 parasharrajat

Thanks for bumping the issue @parasharrajat! Seems Kevin missed this issue and should've been exported a while ago. Asking someone else to export it and then an engineer will get assigned to review the proposals.

iwiznia avatar Aug 13 '21 12:08 iwiznia

It just needs a hidden username input and all password managers should work. If chrome can detect the form then all others will. They follow what chrome does.

parasharrajat avatar Aug 13 '21 12:08 parasharrajat

https://www.upwork.com/jobs/~01b7f83dea2310bcf3 posted to Upwork

laurenreidexpensify avatar Aug 13 '21 12:08 laurenreidexpensify

Triggered auto assignment to @AndrewGable (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Aug 13 '21 12:08 MelvinBot

@anthony-hull did you have any proposals to fix this issue?

laurenreidexpensify avatar Aug 16 '21 08:08 laurenreidexpensify

Sorry I completely missed the export on this, and thanks for stepping in @laurenreidexpensify . Updating my email filters/notifications to make sure this doesn't happen again.

kevinksullivan avatar Aug 16 '21 17:08 kevinksullivan

No stress @kevinksullivan - pro tip, download the K2 extension and use it daily and I guarantee you you'll never need a GH notification again to manage your issues :)

laurenreidexpensify avatar Aug 16 '21 19:08 laurenreidexpensify

It just needs a hidden username input and all password managers should work. If chrome can detect the form then all others will. They follow what chrome does.

as per chromium's docs I did try adding a hidden username field when I first investigated. It didn't like it! Then suddenly worked once I removed display: none I'll have a look at it again 👍

anthony-hull avatar Aug 16 '21 20:08 anthony-hull

Triggered auto assignment to @puneetlath (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Aug 20 '21 09:08 MelvinBot

@puneetlath I'm OOO next week - reassigning for someone else from contributor managers to watch over, looks like that's you

laurenreidexpensify avatar Aug 20 '21 09:08 laurenreidexpensify

I'm going to be off most of next week as well. I chatted with @kevinksullivan and he's going to take this back.

puneetlath avatar Aug 20 '21 16:08 puneetlath

@AndrewGable, @kevinksullivan it looks like no one is assigned to work on this job. Please double the price or add a comment stating why the job isn't being doubled.

MelvinBot avatar Aug 20 '21 19:08 MelvinBot

Waiting on proposal from @anthony-hull

kevinksullivan avatar Aug 23 '21 17:08 kevinksullivan

@AndrewGable, @kevinksullivan it looks like no one is assigned to work on this job. Please double the price or add a comment stating why the job isn't being doubled.

MelvinBot avatar Aug 27 '21 19:08 MelvinBot

^ We're deprecating the above auto-messages but.. it kinda/sorta worked, I just doubled the price to $500 for this job https://www.upwork.com/jobs/~01b7f83dea2310bcf3

mallenexpensify avatar Aug 27 '21 19:08 mallenexpensify

Proposal

  1. Using accessibilityRole we set the containing view element as Form in Both SignInPagelayoutWide and SignPagelayoutNarrow.
  2. Now we have to use a hidden username input on the PasswordForm page.
<View
                        style={{
                            visibility: 'hidden',
                            overflow: 'hidden',
                            width: 0,
                            height: 0,
                        }}
                        accessibilityHidden
                    >
                        <ExpensiTextInput
                            value={this.props.credentials.login}
                            autoCompleteType="username"
                            textContentType="username"
                            nativeID="username"
                            autoCorrect={false}
                        />
                    </View>
  1. Here credentials can be retrieved using the credentials: {key: ONYXKEYS.CREDENTIALS} key.

  2. Now we have to use autoCompleteType="username" for the username input on the LoginForm & autoCompleteType="current-password" for password input on the PasswordForm. I will also use the same values with nativeID prop.

  3. Due to the reason autoCompleteType is different for native and web, I will create a generic utility method located at the TextInputUtils.getPasswordAutocompleteType . I will also refactor other form related utilities into TextInputUtils lib bcz I feel they should be placed in single module.

This should enable the Autofill for password managers.

  1. we have to use setNativeProps to set the HTML attributes which are not supported via react-native. These include method and Action on form and optionally name on TextInput.

https://user-images.githubusercontent.com/24370807/131213483-da9202b2-4997-40c3-a0af-77ab5cd85a3d.mp4

parasharrajat avatar Aug 28 '21 05:08 parasharrajat