[HOLD for payment 2021-12-15] Unable to use 1Password option for autofill on login
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:
- Navigate to staging.expensify.cash
- Right click on the email field
- 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

Expensify/Expensify Issue URL:
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.
Triggered auto assignment to @flodnv (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
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).
Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
cc: @iwiznia I think this is an important issue and @anthony-hull has a good proposal.
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.
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.
https://www.upwork.com/jobs/~01b7f83dea2310bcf3 posted to Upwork
Triggered auto assignment to @AndrewGable (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@anthony-hull did you have any proposals to fix this issue?
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.
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 :)
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 👍
Triggered auto assignment to @puneetlath (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
@puneetlath I'm OOO next week - reassigning for someone else from contributor managers to watch over, looks like that's you
I'm going to be off most of next week as well. I chatted with @kevinksullivan and he's going to take this back.
@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.
Waiting on proposal from @anthony-hull
@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.
^ 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
Proposal
- Using
accessibilityRolewe set the containing view element asFormin Both SignInPagelayoutWide and SignPagelayoutNarrow. - 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>
-
Here credentials can be retrieved using the
credentials: {key: ONYXKEYS.CREDENTIALS}key. -
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
nativeIDprop. -
Due to the reason
autoCompleteTypeis different for native and web, I will create a generic utility method located at theTextInputUtils.getPasswordAutocompleteType. I will also refactor other form related utilities intoTextInputUtilslib bcz I feel they should be placed in single module.
This should enable the Autofill for password managers.
- we have to use
setNativePropsto 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