我正在做电话验证的Flutter与放大工作室。我得到这个错误时,我注册的电话号码。
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: InvalidParameterException(message: One or more parameters are incorrect., recoverySuggestion: Enter correct parameters., underlyingException: com.amazonaws.services.cognitoidentityprovider.model.InvalidParameterException: Invalid email address format. (Service: AmazonCognitoIdentityProvider; Status Code: 400; Error Code: InvalidParameterException; Request ID: d04e58b4-fe2d-4d02-987a-f640188903d3))
这是我注册的方式
Future<void> signUpWithPhoneVerification(
) async {
await Amplify.Auth.signUp(
username: _email.text,
password: _password.text,
options: CognitoSignUpOptions(
userAttributes: <CognitoUserAttributeKey, String>{
// ... if required
CognitoUserAttributeKey.email: _email.text,
CognitoUserAttributeKey.phoneNumber: _email.text,
},
),
);
}
1条答案
按热度按时间jxct1oxe1#
看起来您的代码中有一个拼写错误。请查看: