如何在 AWS Cognito 中的同一设备上创建新身份?
How to create a new identity on same device in AWS Cognito?
我是使用 AWS Cognito 的新手,遇到了 运行 问题 - 我已经设法在应用程序上获取未经身份验证的 ID,以在 Cognito 中创建数据表。但是,我通过 AWS Cognito 仪表板删除了这个 ID,只是为了看看会发生什么,并希望能够通过 Facebook 进行身份验证。有没有办法成功做到这一点?我收到一个错误 "identity XXX not found."
let token = FBSDKAccessToken.currentAccessToken().tokenString
let credentialsProvider = AWSCognitoCredentialsProvider(regionType:.USXXX,
identityPoolId:"XXXX-XXX-XXXXXX")
print(credentialsProvider.getIdentityId())
credentialsProvider.logins = [AWSCognitoLoginProviderKey.Facebook.rawValue: token]
let configuration = AWSServiceConfiguration(region:.USXXX, credentialsProvider:credentialsProvider)
AWSServiceManager.defaultServiceManager().defaultServiceConfiguration = configuration
此外,任何关于联合身份和非联合身份之间差异的说明都会有所帮助。
我确实遇到了这个问题。 SDK 缓存它。你只需要清除缓存。更多信息在这里。
我是使用 AWS Cognito 的新手,遇到了 运行 问题 - 我已经设法在应用程序上获取未经身份验证的 ID,以在 Cognito 中创建数据表。但是,我通过 AWS Cognito 仪表板删除了这个 ID,只是为了看看会发生什么,并希望能够通过 Facebook 进行身份验证。有没有办法成功做到这一点?我收到一个错误 "identity XXX not found."
let token = FBSDKAccessToken.currentAccessToken().tokenString
let credentialsProvider = AWSCognitoCredentialsProvider(regionType:.USXXX,
identityPoolId:"XXXX-XXX-XXXXXX")
print(credentialsProvider.getIdentityId())
credentialsProvider.logins = [AWSCognitoLoginProviderKey.Facebook.rawValue: token]
let configuration = AWSServiceConfiguration(region:.USXXX, credentialsProvider:credentialsProvider)
AWSServiceManager.defaultServiceManager().defaultServiceConfiguration = configuration
此外,任何关于联合身份和非联合身份之间差异的说明都会有所帮助。
我确实遇到了这个问题。 SDK 缓存它。你只需要清除缓存。更多信息在这里。