放大“无法验证客户端的秘密哈希”。 [英] Amplify "Unable to verify secret hash for client"

查看:162
本文介绍了放大“无法验证客户端的秘密哈希”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在使用Amplify和Cognito为部署到Lambda的Angular6应用程序注册用户。客户端希望从电子邮件过渡到用户名作为主要用户标识。因此,我们创建了一个新的用户池/客户端。我无法查看配置设置,只是获得了新的用户池,身份池和客户端ID。然后,我更改了应用程序注册的代码,如下所示:

We have been using Amplify and Cognito to register our users for an Angular6 application deployed to Lambda. The client wanted to transition from email to username as primary user identification. So we created a new user pool / client. I don't have visibility into the configuration settings, I was simply given new user pool, identity pool, and client id's. Then I changed the code for application signup to look like this:

  return from(Auth.signUp({
  'username': username, // was email
  'password': password, 
  attributes: { // added these
    'email': email,
    'phone_number': phone_number,
    'family_name': name,
    'birthdate': DOB,
    'custom:last_4_ssn': SSN // custom attribute
  }}));

我得到而未进行其他更改的响应是:无法验证客户端的秘密哈希。 Google声称问题在于,secretAccess当前是不受支持的配置,但是可以访问这些服务的人向我发誓,在我们的设置中没有配置secretAccess。

The response I'm getting with no other changes made is: Unable to verify secret hash for client. Google claims the problem is that secretAccess is currently an unsupported configuration, but the guy who has access to these services swears to me that nowhere is secretAccess configured in our setup.

I抱歉无法访问配置,但是是否有其他可能的原因收到此错误?

I apologize for not having access to the configuration, but is there any other possible reason to receive this error?

推荐答案

该错误可能是源于您所连接的应用程序客户端具有关联的密钥这一事实。创建用户池应用程序客户端时,默认情况下会生成一个秘密:

That error is probably originating from the fact that the app client you are connected to has an associated secret key. When you create a user pool app client, it generates a secret by default:

现在,带有React-Native Amplify必须使用没有生成密钥的应用程序客户端。因此,当您创建具有所需属性的新应用客户端时,请确保未选中生成客户端机密框。

Right now, with React-Native Amplify you have to use an app client that does not have a secret key generated. So when you create a new app client with your desired attributes, make sure the "Generate client secret" box is unchecked.

这篇关于放大“无法验证客户端的秘密哈希”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆