Jetpack Compose Autofilled Password Update
Asked Answered
T

0

7

I tried to provide some autofill functionality in my app for email and password that is written completely using Jetpack compose. After using this function I achieved autofill but after changing password it remains old password. Is there any idea to let know Google about the new situation in somewhere, maybe after changing password or preferably login with new password, to ask users such a question like "Would like update password?"?

For now, there is no any function related to autofill feature in change password action.

Login Page:

OutlinedTextField(
    modifier = landscapeTextModifier
        .padding(top = 20.dp)
        .autofill(
            autofillTypes = listOf(AutofillType.EmailAddress),
            onFill = { loginViewModel.email.value = it },
        ),
    value = loginViewModel.email.value,
    onValueChange = { loginViewModel.email.value = it.trim() },
    // some other things
)
OutlinedTextField(
    modifier = landscapeTextModifier
        .padding(top = 10.dp)
        .autofill(
            autofillTypes = listOf(AutofillType.Password),
            onFill = { loginViewModel.password.value = it },
        ),
    value = loginViewModel.password.value,
    onValueChange = { loginViewModel.password.value = it },
    // some other things
)
Themis answered 5/11, 2021 at 23:0 Comment(3)
Autofill is not handled by the OS. The autofill APIs in Android are mostly a pass-through to some app that is chosen to handle autofill. That could be Google's own autofill or a third-party app. So, for example, if the user chose a password manager as the autofill implementation, that password manager would know whether the password has changed in its database.Candiecandied
For now only Google authenticator is support explained in https://mcmap.net/q/1003979/-how-to-integrate-autofill-in-jetpack-compose. So, unfortunately it is bug for Google authenticator or probably compose autofill function bug and there is nothing something to do?Themis
Hmmmm... I see an outstanding issue citing the problems that you mention. I do not know what they would have done in Compose UI to limit it to Google Authenticator.Candiecandied

© 2022 - 2024 — McMap. All rights reserved.