【问题标题】:How to get birthdate in existing Cognito User Pool? (Amplify iOS)如何在现有的 Cognito 用户池中获取生日? (放大 iOS)
【发布时间】:2021-06-02 11:43:19
【问题描述】:

我使用 AWS Amplify iOS 来授权用户。我选择了性别、姓名和生日作为用户属性。我想使用 Google 登录作为提供商之一,因此我设置了 Google 帐户并将其连接到 AWS Cognito。范围、应用程序客户端 ID 和其他内容等所有内容都已设置,但我收到此类错误:

Error Domain=com.amazon.cognito.AWSCognitoAuthErrorDomain Code=-3000 "(null)" UserInfo={error=invalid_request: Invalid user attributes: birthdate: String must be no longer than 10 characters
 }

我想一切都很好,但是 Google 登录返回错误的日期格式,因此它无法与 Cognito 进行交互。我怎样才能让它工作? 我无法创建新的用户池。

【问题讨论】:

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


    【解决方案1】:

    你必须用这种格式“MM/DD/YYYY”来格式化生日

    【讨论】:

    猜你喜欢
    • 2017-08-25
    • 2019-05-26
    • 2020-04-21
    • 2023-03-30
    • 2020-10-07
    • 1970-01-01
    • 2019-11-20
    • 2020-10-25
    • 2019-01-06
    相关资源
    最近更新 更多