Delete and Retrieve AWS Cognito identity inside Cognito Federated Identity Pool

笑着哭i 提交于 2019-12-11 06:43:49

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/39093898/delete-and-retrieve-aws-cognito-identity-inside-cognito-federated-identity-pool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!