iOS アプリで Amazon Cognito 用に設定された開発者認証 ID を持っています
ドキュメントのチュートリアルに従いました: Using Developer Authenticated Identities
私のバックエンドは問題なくトークンを生成し、identityIds を取得できます。また、指示に従って iOS アプリで cognito を初期化できます。しかし、dynamoDb リクエストを行うと、エラーが発生します
The security token included in the request is invalid
Cognito 初期化コード:
MyIdentityProvider *identityProvider = [MyIdentityProvider new];
[identityProvider setIdentityPoolId:COGNITO_POOL_ID];
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc]
initWithRegionType:AWSRegionUSEast1
identityProvider:identityProvider
unauthRoleArn:nil
authRoleArn:COGNITO_ROLE_AUTH];
AWSServiceConfiguration *configuration = [AWSServiceConfiguration configurationWithRegion:AWSRegionUSEast1
credentialsProvider:credentialsProvider];
[AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
[[credentialsProvider getIdentityId] continueWithSuccessBlock:^id(BFTask *task){
//In here I can see that everything is ok.
//I have a token and cognitoId
//But despite this, when I make requests I get "The security token included in the request is invalid"
return nil;
}];
誰かが私が間違っているかもしれないことを知っていますか?