amazon-web-services - AWS Amplify:令牌不是来自此身份池的受支持提供商
问题描述
我在我的应用程序上调用此函数以允许通过 Facebook 登录。
async fbSignIn(){
const { type, token, expires } = await Facebook.logInWithReadPermissionsAsync('454050215391261', {
permissions: ['public_profile'],
});
if (type === 'success') {
console.log(token);
Auth.federatedSignIn('facebook', { token, expires_at: expires}, { name: 'USER_NAME' })
.then(credentials => {
console.log('get aws credentials', credentials);
console.log("userProfile: ",JSON.stringify(userProfile));
this.setState({ userProfile: userProfile});
this.props.navigation.replace('Dashboard');
}).catch(e => {
console.log("ERROR:",e);
});
}
}
它正确打开了 Facebook UI,但输入我的凭据后,我收到此错误:
NotAuthorizedException: Token is not from a supported provider of this identity pool.
我已启用 Facebook 作为我的用户池的身份提供者。有什么想法可以解决这个问题吗?
解决方案
推荐阅读
- r - R错误:没有足够的有限观察(斯皮尔曼测试)/我真的迷路了
- python - 网页抓取 - CSS 选择器返回 0
- photo - 苹果照片信息失去焦点
- javascript - 在 React Js 和 Firebase 中处理 Stripe 支付
- java - Spring boot 和异步 RabbitMQ RPC
- twilio - 如何从 IVR 的 say 小部件使用的数据库中获取数据(姓名、号码等)?
- python - 命令提示符找到 Python 模块,但 Git Bash 没有
- oracle - Oracle 12c EMON 处理特性
- python - 尝试使用 SVM 对 aa 数据集进行分类时出现错误
- javascript - 我无法将此箭头函数转换为普通函数。我已经在 chrome 的控制台面板中对此进行了测试