Support textField autofill in Jetpack Compose

coltonidlecoltonidle
Community Member

There's been a few threads on the kotlin-lang slack group (in the #compose channel specifically) where people ask about implementing autofill for their compose apps. The general concensus is to apply the advice found here: https://bryanherbst.com/2021/04/13/compose-autofill/

If you follow that advice, other password managers (like google or keepass) will work. But 1password... just never works with compose text fields.


1Password Version: 8.0
Extension Version: Not Provided
OS Version: Android
Browser:_ Not Provided

Comments

  • ag_timothyag_timothy

    Team Member

    Hi @coltonidle, thanks for your question.

    To my knowledge, 1Password should fill a username or email field with AutofillType.Username or AutofillType.EmailAddress in the node. 1Password has an additional requirement for filling password fields where the input type of the field must also be of a password type. So, if that's not added, 1Password will only fill the username or email and not the password. Is that what you've found or is neither field filling?

  • coltonidlecoltonidle
    Community Member

    Neither field fills. I'd appreciate if an android dev team member just created a sample android project with two text input fields and you will see that 1password doesn't autofill. Interestingly though that google passwords do autofill.
    conversely, if I create an email and password field using the classic android view system then everything works as expected with google and 1password autofill.

    definitely seems to be an issue specific to 1pass.

  • coltonidlecoltonidle
    Community Member

    Looks like 1password not working with compose is being discussed here also.
    https://issuetracker.google.com/issues/176949051#comment15
    but 1pass is still the outlier. google autofill framework works.

  • ag_timothyag_timothy

    Team Member

    Hi @coltonidle, thanks for following up. I'll pass that along to the team for review.

    Receiving the input type has been a sticking point for filling in the password field with Jetpack Compose but the email/username fields seems to be more consistently fillable. If you have 1Password 7 and 8 for Android do you see an difference in filling between the two?

  • goldsteigoldstei
    Community Member

    Can 1password please post a sample compose android project with two text input fields that works?

  • coltonidlecoltonidle
    Community Member

    @goldstei agree. That would be amazing! I've already built 3 production apps with 100% compose and none of them work with 1password. 😭

  • ag_timothyag_timothy

    Team Member

    Hi @goldstei, @coltonidle, I'd be happy to pass along your request.

    An app I'm aware of that, to my knowledge, uses Compose is Mercury. In another thread, one of their engineers mentioned patching the project so 1Password could fill the password field as well as the email field but it doesn't look like that was merged. Testing Mercury now, I can fill the email field with 1Password 7 for Android but not 1Password 8 for Android. If you have access to both version of 1Password for Android do you see similar behavior or does neither fill for you?

  • goldsteigoldstei
    Community Member

    I had the same experience. I have 7 and 8 on a pixel 5. email only on 7, nothing on 8.

  • ag_timothyag_timothy

    Team Member

    Thanks for checking that @goldstei. I've gone ahead and filed an issue so we can investigate this further on our end.

  • coltonidlecoltonidle
    Community Member

    I'd love for 1password8 to update to support compose email and password fields.
    Since other autofill solutions work correctly it does seem like 1password is the odd one out.

    The google team has said that Android Compose is the recommended way to build Android UI in 2022 and it's a bit disheartening to see that 1password has some additional (articifical?) constraints built in where it wont adhere to the typical autofill framework.

    Please reconsider!

  • ag_timothyag_timothy

    Team Member

    Thanks for your comments @coltonidle.

    1Password has an additional requirement for filling password fields where the input type of the field must also be of a password type which helps ensure your passwords are not filled erroneously. That being said, I can certainly understand your point here and I would agree it's worth looking into further. I've shared your feedback with the team. Thanks again!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file