AWS Cognito:如何防止收集电话号码?

时间:2020-01-03 13:29:16

标签: reactjs amazon-web-services amazon-cognito aws-amplify

我有一个带有AWS Amplify集成的React应用程序。通过Cognito添加身份验证时,我不想在注册人员时收集电话号码,但是我无法更改用户池的设置(因为它是在amplify add auth进程中自动创建的。

如何防止电话号码收集?

1 个答案:

答案 0 :(得分:1)

运行:

library(tidyverse)
df = read_table2('Depv      Indv1 Indv2   Indv3
1.1555864       48    1  77.07593
1.0596864       61    2  69.51333
0.8380413       51    1  87.38040
1.5305489       53    2  67.43750
1.0619884       55    1 165.99977
0.8474507       56    2 229.14570
0.9579580       64    2 121.89550
0.7432210       58    1 211.17690
0.8374197       60    1 139.69577
0.7378349       65    1 277.03920
0.6971632       61    1 195.72100
0.5227076       64    2 194.63220
0.9900380       52    1 138.25417
0.8954233       52    2 237.39020
0.9058147       56    1 123.42930
0.9436135       55    2 152.75953
0.7123374       55    1 190.34547
1.1928167       58    1 166.50990
1.3342048       47    2  76.35120
1.0881865       49    1 135.71740
2.9028876       48    2  61.83147
0.6661121       61    1 139.68627') %>% 
  mutate(Indv3_scale = scale(Indv3))

(sd3 = sd(df$Indv3))
#> [1] 60.84117

model1 =  lm(Depv ~ Indv1 + Indv2 + Indv3, data = df)   
model2 =  lm(Depv ~ Indv1 + Indv2 + Indv3_scale, data = df)   

coef(model1)['Indv3'] * sd3
#>      Indv3 
#> -0.1609104
coef(model2)['Indv3_scale']
#> Indv3_scale 
#>  -0.1609104

接下来,在您生成的-cloudformation-template.yml目录的amplify / backend / auth //中,确保您具有以下内容:

amplify add auth

这将使phone_number为可选。