【发布时间】:2020-12-15 17:38:01
【问题描述】:
首先,我使用amplify configure 成功完成了我的react 应用程序的配置。我在AWS Amplify docs 的帮助下做到了这一点。然后,我使用amplify add auth 和amplify push 成功为我的放大项目添加了身份验证。我按照AWS - Authentication with Amplify Doc中的所有步骤进行操作
我的App.js 看起来像这样,
import React from 'react';
import { withAuthenticator, AmplifySignOut } from '@aws-amplify/ui-react';
import Amplify, { Auth } from 'aws-amplify';
import awsconfig from './aws-exports';
Amplify.configure(awsconfig);
const App = () => (
<div>
<AmplifySignOut />
My App
</div>
);
export default withAuthenticator(App);
【问题讨论】:
标签: reactjs amazon-web-services aws-amplify