小编Tim*_*amm的帖子

Flutter 在定义 CognitoSignUpOptions 时不断抛出错误

 Error: The argument type 'Map<String, String>' can't be assigned to the parameter type 'Map<CognitoUserAttributeKey, String>'.
Run Code Online (Sandbox Code Playgroud)

当我查找错误时,没有任何相关信息。

在 AWS 文档中,他们推荐了此代码,这会导致错误:

Map<String, String> userAttributes = {
   'email': 'email@domain.com',
   'phone_number': '+15559101234',
   // additional attributes as needed
};

SignUpResult res = await Amplify.Auth.signUp(
   username: 'myusername',
   password: 'mysupersecurepassword',
   options: CognitoSignUpOptions(
     userAttributes: userAttributes
   )
 );
Run Code Online (Sandbox Code Playgroud)

authentication flutter aws-amplify

1
推荐指数
1
解决办法
647
查看次数

标签 统计

authentication ×1

aws-amplify ×1

flutter ×1