Skip to main content
February 24, 2022
Question

Autofill password field not triggering on (Android devices) for Flutter

  • February 24, 2022
  • 41 replies
  • 6278 views

Password field in Flutter, working fine with Iphones but for Android the password field is never autofilling.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided

41 replies

June 20, 2022

Issue created at Flutter's GitHub
https://github.com/flutter/flutter/issues/105241

1P_Timothy
Community Manager
June 23, 2022

Hi @AugustoResende, thanks for filing and sharing the link with us!

ricardoboss
July 25, 2022

Over on the flutter issue, they are saying you need to find another way to find the auto-fillable input fields... Can one of you decide who has to implement it? Can we as the users do anything to help implement it on either side?

saad
1Password Employee
July 26, 2022

Hi @ricardoboss! Could you share the app that you're having issues with? I'll do another round of testing and add my notes to the Github issue to help.

ricardoboss
July 27, 2022

Hi @saad!

This is a minimal example showing what I expect 1password to be able to fill: https://github.com/ricardoboss/flutter_password_autofill

When tapping on the username field, it should suggest logins I have used within the app or suggest to create a new login.
When a login is selected, it should fill username and password field.
When the submit button is pressed (aka the AutofillGroup is disposed and the appropriate onDisposeAction is executed by it), 1password should prompt the user if they want to save the entered details in case they are different than what was filled in automatically.

Hope this helps.

August 7, 2022

On behalf of @saad, thanks for providing that example @ricardoboss! I'm sure this will be really useful in figuring out what's not quite working. 🙏🏻

rekire
October 22, 2022

What's the current status here? I'm right now working on a login in a Flutter app where I would like to add also support for 2FA.

Is there maybe a way like provided by Google with Smartlock for Passwords to query explicitly 1password for logins?

1P_Timothy
Community Manager
October 26, 2022

Thanks for following up with us. I've reached out to the team regarding your questions and will update when we have any information to share.

December 30, 2022

@ricardoboss @rekire @mtambucho @AugustoResende

I did some research on this and found a way for Flutter developers to get Autofill working with 1Password, but it will require a bit of work. Flutter provides a way to https://docs.flutter.dev/development/platform-integration/android/platform-views, which would allow you to apply an InputType to your text fields as well as Autofill hints.

For example:
textView.inputType = android.text.InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS
and
textView.inputType = android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD

This will need to be done in the Android platform side of the code, but you can create a class which you can then input into your Dart code.

I spent some time working on a dummy app, so I have a working example if anyone needs.

rekire
December 30, 2022

Please share anything which might help