amazon-web-services - 当 federatedSignIn(托管 UI)工作时,Aws amplify SignIn 方法返回不正确的用户名和密码

标签 amazon-web-services amazon-cognito aws-amplify aws-userpools amplifyjs

我正在使用 aws cognito 进行身份验证。我有两个开发和生产环境托管在两个不同的区域。

us-east-1 的发展

在 us-west-2 生产

我想将 cognito 托管 UI 身份验证 (federatedSignIn) 更改为自定义 aws-amplify 登录。在托管 UI 身份验证和自定义登录 aws-amplify 中登录时,开发配置工作正常。在生产环境中,托管 UI 在登录时工作正常,但自定义登录返回

{"__type":"NotAuthorizedException","message":"Incorrect username or password."}

对于现有用户。

开发和生产环境中唯一不同的配置是

发展 -> 始终

生产 -> 否

此配置是否会影响自定义登录?

enter image description here

aws-amplify 配置

Amplify.configure({
  aws_project_region: *******************,
  aws_cognito_region: *******************,
  aws_user_pools_id: *******************,
  aws_user_pools_web_client_id: *******************,
  authenticationFlowType: 'USER_SRP_AUTH'
  oauth: {
    domain: *******************,
    scope: ['email', 'openid', 'profile'],
    redirectSignIn: `*******************`,
    redirectSignOut: `*******************`,
    responseType: 'code',
  },
});

最佳答案

我能够复制这个问题。问题是 POOL_ID 错误。错误的 POOL_ID 不会影响托管 UI 登录,但会影响放大登录,这就是为什么它会为正确的电子邮件和密码返回“错误的用户名和密码”。

关于amazon-web-services - 当 federatedSignIn(托管 UI)工作时,Aws amplify SignIn 方法返回不正确的用户名和密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65170302/

相关文章:

java - 在浏览器中打开时,S3 对象 url 不安全(ssl)

amazon-web-services - AWS S3 API-按元数据搜索

Android:用户登录 Amazon cognito 并在 Amazon S3 之间传输数据

android - 使用 Android SDK 的 Cognito "redirect URL"

apollo - AWS AppSync 订阅在握手期间失败

python - 弹性 beantalk 需要 python 3.5

c# - 来自 Amazon S3 的 Word 文件的内容类型

python - 使用 Cognito 凭证的 AWS IOT 连接

amazon-web-services - AWS Cognito + aws-amplify : session state always keep user logged in?

reactjs - AWS Amplify 用户 session 不会在 ReactJS 中过期