英文:
AWS Cognito: How to prevent collection of phone number?
问题
我有一个使用AWS Amplify集成的React应用程序。在通过Cognito添加身份验证时,我不希望在注册用户时收集电话号码,但我无法更改用户池的设置(因为它在amplify add auth
过程中自动创建)。
如何防止收集电话号码?
英文:
I have a React app with AWS Amplify integration. When adding auth via Cognito, I do not want to collect phone numbers when signing up people, but I cannot change the settings of the user pool (since it has been created automatically in the amplify add auth
process.
How can I prevent phone number collection?
答案1
得分: 1
运行:
amplify add auth
然后,在生成的 <random-number>-cloudformation-template.yml
文件中,确保以下内容位于目录 amplify/backend/auth/<random-number>/
中:
Schema:
- Name: phone_number
Required: false
这将使 phone_number
变为可选项。
英文:
Run:
amplify add auth
Next, in your generated <random-number>-cloudformation-template.yml in the directory amplify/backend/auth/<random-number>/ make sure that you have the following:
Schema:
- Name: phone_number
Required: false
This will make the phone_number optional.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论