AWS Cognito: 如何防止收集手机号码?

huangapple go评论83阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年1月3日 21:29:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/59579457.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定