注册新用户时,cognito出现错误

时间:2019-01-14 06:28:39

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

按照https://medium.com/@nickwang_58849/i-got-the-following-error-after-following-the-steps-82757cfaf9f0的教程,我创建了一个测试项目。但是,尝试注册新用户时出现以下错误。

zone.js:1152 POST https://cognito-idp.us-east-2.amazonaws.com/ 400
(anonymous) @   zone.js:1152
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask  @   zone.js:410
onScheduleTask  @   zone.js:301
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask  @   zone.js:404
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask  @   zone.js:238
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask @   zone.js:261
(anonymous) @   zone.js:1147
ZoneAwarePromise    @   zone.js:910
global.fetch    @   zone.js:1146
request @   Client.js:47
signUp  @   CognitoUserPool.js:116
(anonymous)

以下是请求

Request URL: https://cognito-idp.us-east-2.amazonaws.com/
Request Method: POST
Status Code: 400 
Remote Address: [2600:1f16:9b9:9600:f76:9eb0:3ba7:cdc8]:443
Referrer Policy: no-referrer-when-downgrade
access-control-allow-origin: *
access-control-expose-headers: x-amzn-RequestId,x-amzn-ErrorType,x-amzn-ErrorMessage,Date
content-length: 172
content-type: application/x-amz-json-1.1
date: Mon, 14 Jan 2019 06:23:05 GMT
status: 400
x-amzn-errormessage: Attributes did not conform to the schema: given_name: The attribute is required family_name: The attribute is required
x-amzn-errortype: InvalidParameterException:
x-amzn-requestid: da8dde10-17c4-11e9-80f1-51bb00403798
Provisional headers are shown
Content-Type: application/x-amz-json-1.1
Origin: http://localhost:4200
Referer: http://localhost:4200/auth
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
X-Amz-Target: AWSCognitoIdentityProviderService.SignUp
X-Amz-User-Agent: aws-amplify/0.1.x js

0 个答案:

没有答案