在Cognito联合身份库中删除和检索AWS Cognito身份 [英] Delete and Retrieve AWS Cognito identity inside Cognito Federated Identity Pool

查看:80
本文介绍了在Cognito联合身份库中删除和检索AWS Cognito身份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用身份识别用户池和Facebook作为提供者配置了身份池。启用对未经身份验证的身份的访问。使用javascript sdk从浏览器进行连接。得到了一个身份(当然是未经身份验证的)。现在,为了踢球,我从身份浏览器中删除了身份。之后,我收到 ResourceNotFoundException错误400。



我是使用AWS Cognito身份池的新手。我有一个愚蠢的问题,在任何地方都找不到答案。我们何时/为什么要从身份池中删除身份(通过控制台或API通过身份浏览器删除)?



现在,一旦删除身份,如何连接返回使用同一设备/浏览器?



TIA

解决方案

您可能想删除身份的各种原因。例如,如果您只是要将服务集成到应用程序中,并需要干净,可管理的测试数据。



每个SDK都有一种实用程序方法来清除本地存储(即,在Android中,它是凭据提供者.clear())。找不到您得到的资源是因为SDK已缓存了它将要使用的身份ID,因此删除后,无论您使用的是哪个SDK,您都希望从其调用它, 。 p>

I configured the identity pool with cognito user pool and Facebook as providers. Enable access to unauthenticated identities. Used javascript sdk to connect from browser. Got an identity (unauthenticated of course) back. Now, just for kicks, I deleted the identity from identity browser. After that I am getting 400 error with "ResourceNotFoundException".

I am a newbie playing with AWS Cognito Identity Pool. I have a silly question which I could not find answer anywhere. When/Why do we delete identity from Identity Pool ( either from identity browser via console, or via API ) ?

Now, Once I delete an identity, how do I connect back using the same device/browser ?

TIA

解决方案

There's various reasons you might want to delete identities. For example, if you're just working on integrating the service into your application and want clean, manageable test data.

Each of the SDKs has a utility method to clear the local storage (i.e. in Android it's credentialsProvider.clear()). The resource not found you're getting is because the SDK has cached the identity id it will be using, so you'll want to call that from whichever SDK you're using after deleting and you'll be good to go.

这篇关于在Cognito联合身份库中删除和检索AWS Cognito身份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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