3

I am exploring AWS for iOS,

I am trying to use following things,
1.DynamoDB
2.Cognito
3.Facebook LogIn

I was getting AWS DynamoDB scan working when there wasn't any LogIn integrated. After integration LogIn with Facebook, I am configuring facebook to cognito like this:

 if let fbToken = FBSDKAccessToken.currentAccessToken().tokenString{
        let credentialsProvider = AWSCognitoCredentialsProvider(
        regionType: CognitoRegionType,
        identityPoolId: CognitoIdentityPoolId)
        credentialsProvider.logins = [AWSCognitoLoginProviderKey.Facebook.rawValue: fbToken]
 }

But after configuring this I don't have access of DynamoDB now. It says: Unauthenticated access is not supported for this identity pool

Note: LogIn is necessary in my case.

4

2 回答 2

2

您看到的异常意味着身份池未设置为允许未经身份验证的身份。但由于您使用的是 Facebook 令牌并收到此错误,因此似乎令牌可能未在凭据提供程序上正确设置。

这个博客可能有用 https://mobile.awsblog.com/post/Tx92ASFNST8JPV/Using-Amazon-Cognito-with-Swift-sample-app-developer-guide-and-more

于 2016-03-09T21:57:19.233 回答
1

听起来您需要查看您的 Cognito 用户或角色策略。看看是否允许通过 fb 调用创建的用户和未经身份验证的角色访问 dynamoDB。

于 2016-03-09T20:47:22.423 回答