在 Flutter 中适配 1Password 登录
💡
原文中文,约1700字,阅读约需4分钟。
📝
内容提要
最近在开发Flutter项目,需要适配1Password等密码管理器。需要在Apple开发者后台设置关联域名,添加认证文件,并在Flutter中设置自动填写表单和字段。完成设置后,App登录时能正常适配1Password。
🎯
关键要点
- 在开发 Flutter 项目时,需要适配 1Password 等密码管理器。
- 需要在 Apple 开发者后台设置关联域名,添加认证文件。
- 关联域名的步骤包括在 Apple 开发者后台设置、Xcode 中添加域名和网站设置。
- 在 Apple 开发者后台选择 Associated Domains 选项。
- 在 Xcode 中添加 webcredentials:你的域名。
- 在网站根目录或 .well-known 目录下添加 apple-app-site-association 文件。
- apple-app-site-association 文件需包含 webcredentials 字段和真实的 TeamId、BundleId。
- 在 Flutter 中设置 AutofillGroup 组件以支持自动填写功能。
- 字段需要添加 autofillHints 属性以告知 1Password 填写内容。
- 完成设置后,App 登录时能正常适配 1Password。
➡️