Reader small image

You're reading from  Rapid Application Development with AWS Amplify

Product typeBook
Published inJul 2021
Reading LevelIntermediate
PublisherPackt
ISBN-139781800207233
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Adrian Leung
Adrian Leung
author image
Adrian Leung

Adrian Leung is a full-stack cloud native engineer and Agile Transformation Coach with a deep understanding of Business and Organisational Agilities. His background has led him to coach many enterprises in digital transformation with Design Thinking and Agile as well as enterprise scalable cloud-native solution architectures to deliver real value to their customers. Adrian earned a degree in Applied Information Technology from The University of Newcastle, Australia in 2007. His work history includes helping many enterprises in Hong Kong with their digital transformation journey. He is currently the Founder of Adventvr that is building amazing products and espousing the benefits of serverless systems whenever he has the chance.
Read more about Adrian Leung

Right arrow

Signing up for the ReactJS app

In the previous chapter, we created the sign-up and sign-in form with the Amplify UI. Now, we will make a small modification to the original code.

Let's open the App.jsx file and replace the entire original code with the following code. We will use the withAutenticator component this time:

  1. Import the withAuthenticator and AmplifySignOut Amplify UI components to keep the code simple and lean. Then, import the Auth Amplify library:
    import React from 'react';
    import './App.css';
    import Amplify, { Auth } from 'aws-amplify';
    import { AuthState, onAuthUIStateChange } from '@aws-amplify/ui-components';
    import { withAuthenticator, AmplifySignOut } from '@aws-amplify/ui-react';
    import awsExports from "./aws-exports";
    Amplify.configure(awsExports);
  2. Make sure that you configure the authenticationFlowType parameter with the USER_PASSWORD_AUTH value. This tells the Cognito service to use...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Rapid Application Development with AWS Amplify
Published in: Jul 2021Publisher: PacktISBN-13: 9781800207233

Author (1)

author image
Adrian Leung

Adrian Leung is a full-stack cloud native engineer and Agile Transformation Coach with a deep understanding of Business and Organisational Agilities. His background has led him to coach many enterprises in digital transformation with Design Thinking and Agile as well as enterprise scalable cloud-native solution architectures to deliver real value to their customers. Adrian earned a degree in Applied Information Technology from The University of Newcastle, Australia in 2007. His work history includes helping many enterprises in Hong Kong with their digital transformation journey. He is currently the Founder of Adventvr that is building amazing products and espousing the benefits of serverless systems whenever he has the chance.
Read more about Adrian Leung