ios - 获取 iOS 密码自动填充以使用“更改密码”页面
问题描述
我已经让 iOS 密码自动填充功能与“登录”和“新帐户”页面一起使用,但不是“更改密码”页面。我在那个页面上有 4 个 UITextFields。1 使用 .email 作为内容类型,1 使用 .password 作为原始密码的内容类型,2 使用 .newPassword 作为新密码的内容类型。
自动填充尝试使用新生成的密码填充 .password 和第一个 .newPassword 字段,最后一个字段为空白。我试过切换顺序,但密码没有在钥匙串中更新。
我尝试只使用 2 个 .newPassword 字段,但它仍然没有更新它们的钥匙串。
有谁知道如何让它工作,或者是否有关于“更改密码”屏幕最佳实践的教程?Apple 的文档仅涵盖登录和新帐户。
谢谢。
解决方案
I experience the same problem: AutoFill fills old password and new password field with the same generated password.
I solved this by moving the old password field up above the username.
- Current password (content type:
password
) - Username (content type: username) (in my case this is a non editable pre-filled text field)
- New password (content type:
newPassword
)
It's a bit strange but after the view controller dismisses the keychain password is updated immediately without confirmation.
推荐阅读
- kubernetes - 云提供商未正确初始化
- maven - maven-surefire-plugin 在 SpringBoot 2.2.2.RELEASE 及更高版本中不起作用
- c++ - 如何将 cv::Mat 转换为 void*
- javascript - 阿拉伯语 JavaScript 中的日期时间
- mpi - 程序完成后 mpirun 挂起
- angular - 带有 Angular 和 Spring 的 Websocket
- c# - 'System.String[]' 不能映射到原始类型
- r - 如何在 nls 的 poly 方法中包含参数“a”?
- javascript - 如何在react.js中处理请求标头接受application / ld + json获取请求
- java - 如何使用保存方法更新 Spring Boot 中的元素?