Using Amazons Cognito Developer Identities

I follow the amazon documentation, but it does not work as advertised. I have the latest sdk too. The self.identity = code below does not work because it is read-only.

@implementation DeveloperAuthenticatedIdentityProvider /* * Use the token method to communicate with your backend to get an * identityId and token. */ - (AWSTask <NSString*>) token { //Write code to call your backend: //Pass username/password to backend or some sort of token to authenticate user //If successful, from backend call getOpenIdTokenForDeveloperIdentity with logins map //containing "your.provider.name":"enduser.username" //Return the identity id and token to client //You can use AWSTaskCompletionSource to do this asynchronously // Set the identity id and return the token self.identityId = response.identityId; return [AWSTask taskWithResult:response.token]; } @end 

How can i do this? Thanks.

+5
source share
1 answer

You have compiler errors in your other question, fix these first Using AWS Cognito and aws-ios-sdk v.2.4.16 with developer IDs

The native signature for the method proposed by the compiler,

 - (AWSTask<NSString *> *)token; 
+2
source

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


All Articles