简体   繁体   English

使用DynamoDB时,此标识池不支持未经身份验证的访问

[英]Unauthenticated access is not supported for this identity pool, while using DynamoDB

I am exploring AWS for iOS, 我正在探索适用于iOS的AWS,

I am trying to use following things, 我正在尝试使用以下内容,
1.DynamoDB 1.DynamoDB
2.Cognito 2.Cognito
3.Facebook LogIn 3.Facebook登录

I was getting AWS DynamoDB scan working when there wasn't any LogIn integrated. 当没有集成任何LogIn时,我正在使AWS DynamoDB扫描工作。 After integration LogIn with Facebook, I am configuring facebook to cognito like this: 在使用Facebook集成LogIn之后,我正在将facebook配置为cognito,如下所示:

 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. 但配置完成后,我现在无法访问DynamoDB。 It says: Unauthenticated access is not supported for this identity pool 它说: Unauthenticated access is not supported for this identity pool

Note: LogIn is necessary in my case. 注意:在我的情况下,LogIn是必需的。

The exception you are seeing means that identity pool is not setup to allow unauthenticated identities. 您看到的异常意味着身份池未设置为允许未经身份验证的身份。 But since you are using Facebook Token and getting this error, it seems that token may not have been set correctly on credentials provider. 但由于您使用Facebook令牌并收到此错误,似乎令牌提供程序上可能未正确设置令牌。

This blog might be useful https://mobile.awsblog.com/post/Tx92ASFNST8JPV/Using-Amazon-Cognito-with-Swift-sample-app-developer-guide-and-more 此博客可能很有用https://mobile.awsblog.com/post/Tx92ASFNST8JPV/Using-Amazon-Cognito-with-Swift-sample-app-developer-guide-and-more

Sounds like you need to take a look at your Cognito user or role policies. 听起来您需要查看Cognito用户或角色策略。 Take a look and see if the users created through the fb call and the unauthenticated roles are allowed access to dynamoDB. 看看是否允许通过fb调用创建的用户和未经身份验证的角色访问dynamoDB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 该身份池和用户池不支持未经身份验证的访问 - Unauthenticated access is not supported for this identity pool with user pool AWS Cognito:“此身份池不支持未经身份验证的访问权限。” - AWS Cognito: “Unauthenticated access is not supported for this identity pool.” AWS / iOS / Cognito:此身份池不支持未经身份验证的访问 - AWS / iOS / Cognito: unauthenticated access is not supported for this identity pool iOS-使用Facebook登录,但仍然得到:“此身份池不支持未经身份验证的访问” - iOS - Login in with Facebook but still getting: “Unauthenticated access is not supported for this identity pool” 将DynamoDB与Cognito一起使用:令牌不是来自此身份池的受支持提供商 - Using DynamoDB With Cognito: Token is not from a supported provider of this identity pool 在 IOS 上使用 AWS sdk 而不使用身份池 - Using AWS sdk on IOS without using Identity Pool 未经身份验证的身份未映射到开发者身份验证的身份 - Unauthenticated identites not mapping to Developer Authenticated Identity 亚马逊认知和身份池问题 - Amazon cognito and Identity pool issue AWS Cognito联合身份池-身份验证角色 - AWS Cognito Federated Identity Pool - Role on Authentication 无法找到Amazon Cognito Identity Pool - Amazon Cognito Identity Pool can not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM