Use the AWS Amplify withAuthenticator HOC to Implement a React User Authorization Flow

Share this video with your friends

Send Tweet

In this lesson we’ll enable user authentication (Amazon Cognito) in the existing AWS Amplify project, then use the withAuthenticator higher order component from AWS Amplify to quickly add a preconfigured sign up and sign in flow.

Raquel
Raquel
~ 6 years ago

Hi, I know its cool using VI and everyone has his preference, but for learning purposes would be much better to use an IDE with semantic colors, it's much better to read than just white text. Anyway, quite cool and shorter, like I like. Thanks!

Hank de
Hank de
~ 6 years ago

Why does a user have to come up with a username when signing up? You should be able to just enter your email address...

Gary
Gary
~ 6 years ago

Hank, you can customize the form or make your own.

nader dabit
nader dabit(instructor)
~ 6 years ago

Gary, yes you can customize it to some extent, but for full control it's better to just use the Auth component & write the UI from scratch.

https://aws-amplify.github.io/docs/js/authentication

nader dabit
nader dabit(instructor)
~ 6 years ago

Hank, this is the way it's configured out of the box. You can have more control if you just use the Auth component without the HOC.

Eyas Tayyem
Eyas Tayyem
~ 6 years ago

Any idea why my cognito user pool is empty?

Xavier Brinon
Xavier Brinon
~ 6 years ago

You need to select your region, the site might have selected the wrong one.

Shawn Wang
Shawn Wang
~ 5 years ago

[redacted, pls ignore]

Dave Fedele
Dave Fedele
~ 4 years ago

Just ran this today and since aws-amplify-react@4.x.x, the Authenticator comes by default un-styled.

To include default styling so it appears as the video, add this line before Amplify.configure in your index.js

import '@aws-amplify/ui/dist/style.css';

~ 3 years ago

this course is quite old and does not match with current changes in aws. Error while creating user