【发布时间】:2019-06-18 09:06:00
【问题描述】:
我使用了amplify add auth,它工作正常,然后amplify push。
React 网站运行没有问题。但是当我尝试注册或登录时,我收到错误[ERROR] AuthClass - Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID。
但是 aws_user_pools_id 与 aws 控制台中的 id 相同。
有人知道问题可能是什么吗?
谢谢;)
那是我的 App.js 没有魔法......
import React, { Component } from 'react';
import './App.css';
import HomeScreen from './screens/HomeScreen';
import { withAuthenticator } from 'aws-amplify-react';
class App extends Component {
render() {
return (
<div className="App">
<HomeScreen />
</div>
);
}
}
export default withAuthenticator(App);
【问题讨论】:
标签: reactjs amazon-cognito aws-amplify