按照 aws 的建议,当我尝试调用签名时,我按照移动集线器的介绍在应用程序中设置了我的 AWSCognito。它说找不到身份。身份在用户池中,我可以在后端看到它也标记为已验证。为什么会出现此错误?
代码:
func handleLoginWithSignInProvider(signInProvider: AWSSignInProvider) {
AWSIdentityManager.defaultIdentityManager().loginWithSign(signInProvider, completionHandler:
{(result: Any?, error: Error?) -> Void in
if error == nil {
/* Handle successful login. */
print("success")
}
print("Login with signin provider result = \(result), error = \(error)")
})
}
错误:
GetCredentialsForIdentity 失败。错误是 [Error Domain=com.amazonaws.AWSCognitoIdentityErrorDomain Code=10 "(null)" UserInfo={__type=ResourceNotFoundException, message=Identity 'eu-west-1:xxxxxxx' not found.}] AWSiOSSDK v2.4.16 [错误] AWSCredentialsProvider.m 行:577 | __44-[AWSCognitoCredentialsProvider 凭证]_block_invoke.353 | 无法刷新。错误是 [Error Domain=com.amazonaws.AWSCognitoIdentityErrorDomain Code=10 "(null)" UserInfo={__type=ResourceNotFoundException, message=Identity 'eu-west-1:937fe0c4-974b-4f77-a835-425e1d9d9e00' not found.} ] 使用登录提供商登录结果 = nil, error = Optional(Error Domain=com.amazonaws.AWSCognitoIdentityErrorDomain Code=10 "(null)" UserInfo={__type=ResourceNotFoundException, message=Identity 'eu-west-1:xxxxxxxxx'