5
Tôi đang theo tài liệu amazon nhưng không hoạt động như được quảng cáo. Tôi có sdk mới nhất. Self.identity = code bên dưới không hoạt động vì nó chỉ đọc.Sử dụng Danh tính nhà phát triển của Amazon Cognito
@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
Làm cách nào để khắc phục sự cố này? Cảm ơn.