Angular Cognito登录正常,但浏览器中出现400错误

Angular Cognito登录正常,但浏览器中出现400错误,angular,amazon-cognito,Angular,Amazon Cognito,奇怪的是,我正在使用angular 7和API网关进行身份验证 我的问题是,在使用amplify和amazon cognito identity js时,我在浏览器中都会出现400错误。一切正常,但错误仍然存在 见下文:- Auth.configure({ mandatorySignIn: false, // REQUIRED - Amazon Cognito Identity Pool ID identityPoolId: 'eu-west-1:ss

奇怪的是,我正在使用angular 7和API网关进行身份验证

我的问题是,在使用amplify和amazon cognito identity js时,我在浏览器中都会出现400错误。一切正常,但错误仍然存在

见下文:-

Auth.configure({
      mandatorySignIn: false,
        // REQUIRED - Amazon Cognito Identity Pool ID
        identityPoolId: 'eu-west-1:ssssssssssss',
        // REQUIRED - Amazon Cognito Region
        region: 'eu-west-1', 
        // OPTIONAL - Amazon Cognito User Pool ID
        userPoolId: 'eu-west-1_ssssssssssss', 
        // OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
        userPoolWebClientId: 'sssssssss',
     })
    const user = Auth.signIn(userName, password).then(res =>
      {});
在浏览器中,我得到:-

POST 400错误

然而,代码是有效的,你知道为什么会发生这种情况吗


感谢您的帮助

原来我使用了错误的应用程序客户端ID。感谢所有注意到我使用了错误的应用程序客户端ID的人。感谢所有注意到我的人