如何将移动集线器与现有的认知用户池链接? [英] How to link my mobile hub with my existing cognito user pool?

查看:85
本文介绍了如何将移动集线器与现有的认知用户池链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注以下页面以在我的移动应用程序中使用cognito https://docs.aws.amazon.com/aws-mobile/latest/developerguide/getting-started.html https://aws.amazon.com/blogs / mobile / easy-sign-in-and-sign-up-ui-with-aws-mobile-sdk-for-android /

I'm following these pages to use cognito on my mobile app https://docs.aws.amazon.com/aws-mobile/latest/developerguide/getting-started.html and https://aws.amazon.com/blogs/mobile/easy-sign-in-and-sign-up-ui-with-the-aws-mobile-sdk-for-android/

我已经创建了移动中心并下载了json文件,但现在它希望我创建一个认知用户池,但是我已经有一个。如何将移动集线器与现有用户池链接?

I have created the mobile hub and downloaded the json file but now it wants me to create a cognito user pool, but I already have one. How can I link the mobile hub with the existing user pool?

谢谢。

推荐答案

AWS Mobile Hub当前不提供将现有的Cognito用户池导入项目的方法,但是,您可以使用只需几个简单的步骤,就可以通过Mobile Hub生成的Cognito身份池来使用任何您喜欢的Cognito用户池。首先,将用户池添加到Mobile Hub项目,以便该项目启用Auth。然后单击资源链接,找到您的Cognito身份池,然后单击指向Cognito控制台的深层链接。现在,单击以编辑您的身份池。在身份验证提供程序下,您可以找到Cognito用户池的设置;根据您的Cognito用户池设置这些值。然后,返回到Mobile Hub控制台,并在下载所需的任何应用程序平台的配置文件时,只需编辑结果文件以放入正确的Cognito用户池设置即可。



例如,如果您使用的是Android,请在Mobile Hub控制台中单击Android卡上的集成,然后单击下载配置文件。然后,您可以在 awsconfiguration.json文件中编辑这些行。


AWS Mobile Hub does not currently provide a means to import your existing Cognito User Pool into the project, however, you can use whatever Cognito User Pool you like with the Mobile Hub-generated Cognito Identity Pool with a few easy steps. First, add a User Pool to the Mobile Hub project, so the project has Auth enabled. Then click on the Resources link and find your Cognito Identity Pool, and click the deep-link to the Cognito console. Now, click to Edit your Identity Pool. Under "Authentication Providers" you'll find settings for the Cognito User Pool; set those values based on your Cognito User Pool. Then, go back into the Mobile Hub console and when you download the configuration file for whatever app platform you want, just edit the resulting file to put in the correct Cognito User Pool settings.

For example, if you're using Android, in the Mobile Hub console, you'll click "Integrate" on the Android card, and "Download Config File." Then, you'd edit these lines in the "awsconfiguration.json" file.

"CognitoUserPool": {
  "Default": {
    "PoolId": "us-east-1_9rEQUqXYZ",
    "AppClientId": "gsdnilro5k0hillo8t6ojlxyz",
    "AppClientSecret": "pkqbqn8ulo08lghald06sjeib4mvbvpd6b0qork2h30n5klixyz",
    "Region": "us-east-1"
  }
},

...以便为您的Cognito用户池使用适当的值,那么您应该一切顺利。



请注意,这些说明应可让您重新使用Cognito用户池,但是由于Cognito身份池已更改,因此您的用户身份ID值也会更改。



有几个客户要求能够重用其Cognito用户池和Cognito身份池,因此我们正在对这些请求进行优先级排序,但是我不能确切说明何时可以使用该功能。



此致,

Andrew C

A WS Mobile开发人员经验

...to use the appropriate values for your Cognito User Pool, and you should be good to go.

Note that these instructions should let you re-use the Cognito User Pool, but because the Cognito Identity Pool has changed, your user identity ID values will change.

We have had several customers request being able to re-use their Cognito User Pool and Cognito Identity Pool, so we are working on prioritizing those requests, but I can't say exactly when that functionality would be available.

Sincerely,
Andrew C
AWS Mobile Developer Experience

这篇关于如何将移动集线器与现有的认知用户池链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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