需要社交登录 (OAuth) 性别

时间:2021-04-20 20:27:54

标签: amazon-cognito aws-amplify

在我的用户池中,我已将性别标记为必需属性,我认为在使用 Facebook 和 Google 配置 oauth 时会导致一些问题。

我已按照 Amplify 文档中的步骤配置社交登录 doc 但我在 url 中遇到错误,如下所示:https://auth.mydomain.com/sigin/?error_description=attributes+required%3A+%5Bgender%5D&state=LdMFbexCz81loAUnV66hue9LSuta5zcn&error=invalid_request# 在选择要登录的帐户并首先登录 facebook 后使用 google

注意:我在 react-native 中使用了放大

1 个答案:

答案 0 :(得分:1)

Cognito 不允许在创建池后更改属性。在 AWS 控制台 > 常规设置 > 属性上,您会看到 These attributes were selected when the pool was created and cannot be changed.

您可以尝试一下:https://aws.amazon.com/premiumsupport/knowledge-center/cognito-change-user-pool-attributes/ 建议创建一个新池并将用户迁移到新池。