Understanding Cognito Identity

I stumbled for several hours trying to understand Cognito and identity management in a mobile application. I am relatively new to mobile app development. I used to make a mobile application, but have never been with a back-end. so now I'm playing with AWS, intending to try just that.

I want to make sure that every user using my application can be uniquely identified so that I can store the content that they send to the server associated with it. But I also want other users to be able to see their submitted content. I have not yet decided on the storage mechanism (it seems that Amazon offers several), but whatever it is, it will be a perpetually free service, since I do not plan to spend (or earn) any money on this application.

Part of what confuses me is the need to create application identifiers with any service that I wanted to use with federated identifiers. I'm starting to suspect that there are several types of credentials that confuse me. Does the application have its own identity that is independent of user identity? I did not expect that you would have to create Google IDs and the Amazon App so that users could log in to my application using their Google or Amazon accounts. I suspect that I misunderstand the API, and it is very difficult for me to find a suitable code example that can be used with Xamarin.

I have a lot of code (unique identifier x'd out):

CognitoAWSCredentials credentials = new CognitoAWSCredentials( "us-east-2:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Identity pool ID RegionEndpoint.USEast2 // Region ); 

And it seemed to run (in the debugger), without causing at least an exception, but I don’t understand what it gave me. I doubt that this credential object uniquely identifies the user after rebooting the device and starts the application again the next day. For this, I suspect that I need something else, and I do not understand that. What is the next simplest step to get a unique identifier for a user that I can store with my content in order to associate it with them?

+1
source share
1 answer

Is it established that users use the identification of the third part or do you want to provide the user with their identity? For federated identifiers (third parties), you need to provide the identifier pool identifier that is created in Cognito to identify the federated identity provider. For your own identifiers in Cognito, you create user pools that also have an identifier.

If you want to give the user login and logon, you want to use Cognito identifiers, not federated identifiers. The link below contains some good links to this -

https://aws.amazon.com/cognito/dev-resources/

0
source

Source: https://habr.com/ru/post/1269628/


All Articles