Adding Cognito Signup and Login to your React App with AWS Amplify

  Рет қаралды 116,224

Complete Coding - Master AWS Serverless

Complete Coding - Master AWS Serverless

3 жыл бұрын

Full Amplify video tutorial series -- • AWS Amplify - full tut...
In this video we'll be setting up a new React App with AWS Amplify to add Sign up, Login and Logout in the easiest way possible.
Finished Code: github.com/SamWSoftware/ampli...

Пікірлер: 151
@programmusicuk
@programmusicuk 3 жыл бұрын
Thanks Sam - Creeping up towards that 5K subscribers mark!
@CompleteCoding
@CompleteCoding 3 жыл бұрын
I'm looking to be putting out more videos now so it shouldn't be long!
@erniea5843
@erniea5843 3 жыл бұрын
Fantastic job! Easy to follow and understand. keep up the good work
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Thanks for the support Ernie
@mbharatm
@mbharatm 3 жыл бұрын
Superb! Starts right off with EXACTLY what I wanted to take a look at... Thanks!
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Glad you liked it!
@TheCoderCareer
@TheCoderCareer 3 жыл бұрын
Simple and concise, excellent tutorial - subscribed
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Thanks for the sub!
@jeffjcd
@jeffjcd 3 жыл бұрын
Great Content! I’ve been looking for something like time for almost a week now. Thank You 😊 so much
@CompleteCoding
@CompleteCoding 3 жыл бұрын
My pleasure. I'm glad it was useful
@syremusic_
@syremusic_ 2 жыл бұрын
Excellent video, very easy to follow. Thanks!
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Glad it was helpful!
@nadiar646
@nadiar646 3 жыл бұрын
great tutorial, looking forward to building out the app with the dynamodb tutorial :)
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Have fun!
@user-lg6ol9zi3t
@user-lg6ol9zi3t 3 жыл бұрын
Thank you so much! you just saved one programmer's life...!
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Haha. Glad I could help!
@martyoneill3468
@martyoneill3468 7 ай бұрын
brother this is excellent! greetings from dagestan
@Miksta98
@Miksta98 3 жыл бұрын
Thanks man, very underated tutorial, subscribed.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Thanks for the sub!
@alfredabate3176
@alfredabate3176 3 жыл бұрын
Thank you so much. You help me understand how to use React with Amplify.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Happy to help!
@yo1414
@yo1414 Жыл бұрын
Very nice - thank you Sam!
@Petee92HTID
@Petee92HTID 3 жыл бұрын
Awesome tutorial man, helped me a lot. Thanks
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Glad it helped!
@anuragmy
@anuragmy 3 жыл бұрын
Great!!! loved it ! simple and to the point
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Glad you liked it!
@khandoor7228
@khandoor7228 3 жыл бұрын
Really nice Sam, I'm looking forward to building this out more. I hope that is your intention. Hopefully a DB (Dynamo perhaps) and deployment maybe??
@CompleteCoding
@CompleteCoding 3 жыл бұрын
That's the plan! Amplify allows you to connect directly to Dynamo
@braindead2237
@braindead2237 2 жыл бұрын
well explained!! Brilliant sir! Thank you very much
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Glad you found it useful
@AAquaticAApe
@AAquaticAApe 3 жыл бұрын
Thanks for the great video! Subscribed
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Awesome, thank you!
@jamesbotwina8744
@jamesbotwina8744 3 жыл бұрын
such a great tool. Saves a ton of time. No more having to worry about token authentication.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
It's amazing how easy login and authentication becomes with cognito
@jamesbotwina8744
@jamesbotwina8744 3 жыл бұрын
@@CompleteCoding Does it cost any money to use the forgot login functionality where AWS sends you a verification code in an email?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
@@jamesbotwina8744 I don't think that it does cost to send those emails. AWS SES has a free tier of 62,000 emails per month
@jamesbotwina8744
@jamesbotwina8744 3 жыл бұрын
@@CompleteCoding wow, very nice. Looks like you can get a lot done with the free tier. I've also been looking into AWS Activate for a startup idea I have. $1000 in credits is huge!
@CompleteCoding
@CompleteCoding 3 жыл бұрын
@@jamesbotwina8744 Yes, I think I use a few dollars a month on all of my projects combined. Even getting one or two paying users covers the AWS costs.
@adrenelinjunky
@adrenelinjunky 3 жыл бұрын
Thank you for the walkthrough 👍
@CompleteCoding
@CompleteCoding 3 жыл бұрын
No problem 👍 glad you found it useful
@gavincoulson3900
@gavincoulson3900 2 жыл бұрын
Awesome video, thanks for this!
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Glad you liked it!
@isabelfreitas6421
@isabelfreitas6421 2 жыл бұрын
Great video, easy to follow! I was wondering have you tried using MFA with amplify?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Not directly with the Amplify CLI but I have used MFA on Cognito
@saulbenavides4037
@saulbenavides4037 10 ай бұрын
Thanks for sharing!
@BC_Clips
@BC_Clips 2 жыл бұрын
Great video! thank you!!! 🤓
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Glad it was useful
@gusinthecloud
@gusinthecloud 11 ай бұрын
Great Video!!!
@manjirikadam3984
@manjirikadam3984 3 жыл бұрын
Very helpful, thank you
@CompleteCoding
@CompleteCoding 3 жыл бұрын
You're welcome!
@roberthmejias
@roberthmejias 2 жыл бұрын
Awesome, this video ha really helped me!
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Glad to hear it!
@raunaksinghjolly8334
@raunaksinghjolly8334 2 жыл бұрын
Really Helpful, tysm!
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Glad it helped!
@charlym9323
@charlym9323 3 жыл бұрын
Dude, you are the best
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Thanks, I'm glad you like the videos
@LeonardoArangoCifuentes
@LeonardoArangoCifuentes 2 жыл бұрын
Hello, thank u so much for the tutorial, one question, what is the difference between the import you do and this one: import { Authenticator } from '@aws-amplify/ui-react'; import '@aws-amplify/ui-react/styles.css';
@CompleteCoding
@CompleteCoding 2 жыл бұрын
This video was made before the latest version of the Amplify UI Library came out. You code is more up to date than this video now.
@zakirdev6482
@zakirdev6482 3 жыл бұрын
Great Tutorial
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Thanks!
@piotrprs572
@piotrprs572 3 жыл бұрын
FCK AWSOME VIDEO!!! GREAT JOB... I save lot a time because of this. :-)
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Glad it helped!
@herbertk9266
@herbertk9266 11 ай бұрын
Thank you
@khanf13
@khanf13 3 жыл бұрын
super helpful! just curious - lets say after logging in i want the user to be able to create a blog post and only users which the creater of the blogpost adds to the list of blog readers can see that blog post...how would i do this in amplify??
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Really interesting idea. You could do it by creating an 'approved reader' table. Each row has a primary key of the reader's userID and a range key of the articleID as well as a secondary index with primary of authorID and range key of articleID + reader userID. You'd then create a query called 'getArticles' which would query the approved readers table. That would return a list of article IDs. You'd then use those to get the articles. The owner of the article would be able to query all of the users for a given article. They could then add and remove rows from that table to allow or disallow readers.
@markussell9431
@markussell9431 2 жыл бұрын
Amazing guide. Just works like a charm. One more question if I may: Is it possible to let an admin validate and confirm self-created accounts?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Yes you can! You need to set up cognito so that it doesn't authenticate the user on phone or email. This way the user will be be signed up but not authenticated so will not be able to sign in. To allow a user to access the app, the cognito admin needs to approve the user. You could do this by cognito console or by cognito admin APIs.
@saifsaeed1158
@saifsaeed1158 2 жыл бұрын
thank you so much my man
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Really glad that you liked the video
@Vagabondeer
@Vagabondeer 3 жыл бұрын
Great tutorial, thanks for sharing! Any plans on making one that shows how to integrate with Stripe to create an account? :)
@CompleteCoding
@CompleteCoding 3 жыл бұрын
There are loads of videos on youtube about this. It can be a complex topic with all of the different payment types and I'm not an expert in Stripe
@nand0l
@nand0l 2 жыл бұрын
Awesome video, you showed your final test on local host, but this is serverless... Isn't it? So how do I push it to an S3-bucket and test it from there?
@CompleteCoding
@CompleteCoding Жыл бұрын
Amplify has an inbuilt hosting solution (which used s3 behind the scenes) I also have a video on this with the serverless framework kzfaq.info/get/bejne/qbOKoJt5prmvnIE.html
@discoverick
@discoverick 2 жыл бұрын
Hi Thanks a lot for the tuttorial, learning a lot - Do you have a tutorial how to deploy front end part to AWS and actually see this on the internet and not just local ? Thanks in advance
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Yes I do kzfaq.info/get/bejne/qbOKoJt5prmvnIE.html This also covers Cloudfront. If you don't need that you can just do the S3 and s3Sync parts to see it online
@hareeshbadiger8167
@hareeshbadiger8167 2 жыл бұрын
hello I am beginner to aws.. i hv done everything what u said in video.. but once i closed everything ..how do i again access my created page or deployed react app.. i checked with npm start it showing error.. plz help me for this
@CompleteCoding
@CompleteCoding 2 жыл бұрын
@@hareeshbadiger8167 If you go into your AWS account and search for "clioudfront". In there you should see your new distribution which points to your S3 bucket. It will have a URL like d111111abcdef8.cloudfront.net/index.html
@divyagugale
@divyagugale 2 жыл бұрын
Thank you so much for this video, Sam! You did great work! but I have one doubt, what if I don't have administrator access and I have to log in to my AWS Account via SAML2AWS cli, how should I add the same functionality with SAML2AWS credentials. Eagerly waiting for your reply, Thank you once again :)
@CompleteCoding
@CompleteCoding 2 жыл бұрын
That depends on what permissions the AWS Admin has given to the role that you are assuming in AWS. Sometimes you may need to ask them to add a certain permission to your role if you hit a permissions issue. I don't think that using SAML2AWS credentials will make any difference, but I've not tested that.
@divyagugale
@divyagugale 2 жыл бұрын
@@CompleteCoding yes got your point, Thanks!
@fastneasy
@fastneasy 3 жыл бұрын
good video, cool accent....by the way what theme u r using in vscode ?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
I'm using Monokai Pro theme. It is a paid theme ($10 I think) but I really like it and have used it for years now.
@hritthikbose2143
@hritthikbose2143 3 жыл бұрын
It was Great!
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Glad you liked it
@tranminhhaifet
@tranminhhaifet 3 жыл бұрын
Many thanks! Has anyone customized style of Sign Out Button?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
I think the best way to customise the signout (or signin) is to create your own component and just call the Amplify methods for signing in and out. docs.amplify.aws/lib/auth/emailpassword/q/platform/js#sign-out
@samueleu6362
@samueleu6362 3 жыл бұрын
In the last video, you said you'd use the Cognito resources set up using Serverless in the Amplify app. But all you did is use amplify to recreate the same resource?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
I was planning to do a custom cognito setup (using the last video) but realised that this wasn't the easiest way to do things so went with just using amplify instead.
@pastafarian7
@pastafarian7 Ай бұрын
Can Amplify set up React router? Or do I have to do that myself? (I'm asking other places too, no worries if you're busy, just something I wish was included in this tutorial)
@xuloIsaias
@xuloIsaias 2 жыл бұрын
Great video!, but how do I control to create users only from my domain?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
You can change the settings so that users aren't able to sign themselves up. This is a setting called "Only allow administrators to create users" You can then create users from within the Cognito Console.
@roopamsingh3972
@roopamsingh3972 Жыл бұрын
well done
@CompleteCoding
@CompleteCoding Жыл бұрын
Thanks
@jiansu
@jiansu 3 жыл бұрын
Thank you for the hard works! I love it. my question is how do we custom Amplify login page, lol they look ugly
@CompleteCoding
@CompleteCoding 3 жыл бұрын
My pleasure. There are functions that you can call on the amplify sdk like "Auth.signIn" which you can wrap in your own actions to be used in a custom login screen. The Amplify docs are actually really good. docs.amplify.aws/lib/auth/emailpassword/q/platform/js
@yankee-in-london
@yankee-in-london 2 жыл бұрын
Wondering how you find Amplify. I've been of the opinion that I must avoid using it due to its massive JS payload but maybe this has gotten better?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
I now use the amplify auth package to manage the login to cognito and adding auth to all of the api requests. I don't use amplify for deploying any resources.
@anshusinha2378
@anshusinha2378 3 жыл бұрын
Thanks a lot
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Happy to help
@clutchitcarnage1540
@clutchitcarnage1540 2 жыл бұрын
good one!
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Thanks for the visit
@lucasterable
@lucasterable Жыл бұрын
How does this relate to the Cognito user pool created in the previous video? 8:35 is it safe to have that info in the single-page-application code?
@CompleteCoding
@CompleteCoding Жыл бұрын
Amplify creates it's own cognito user pool. Yes, knowing those details doesn't give anyone access to anything. It just tells them where to log in to. They could in theory use them to create their own login page but that wouldn't be much use
@isidorosparlamas8950
@isidorosparlamas8950 3 жыл бұрын
Thank you very much! Excellent! I have this question: My react app's landing page is the login page and I need to change that to a welcome page with a link to the login page. Anybody can help?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Keep watching the playlist and we get onto changing the home page very soon. kzfaq.info/sun/PLmexTtcbIn_hvPcUm3oAufCtH7dwNAC-g
@f2pethereum67
@f2pethereum67 2 жыл бұрын
Use react router dom and set the home page of path (/) and use redirect method to send to it welcom page
@andreamanaog7767
@andreamanaog7767 3 жыл бұрын
can I override the ui of it ? for example if I can remove the forgot your password or create an account?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Yes, there are some parameters that you can pass into the configuration for amplify to remove those buttons. You could also use the amplify auth functions and attach those to your own custom login screen if you want full control over your UI
@rbrojas2040
@rbrojas2040 15 күн бұрын
having trouble with AmplifySignOut since it might be deprecated?
@deepeshchauhan1215
@deepeshchauhan1215 3 жыл бұрын
Thanks for the Content! However, I am facing an error "zsh: command not found: amplify" when running the command: >> amplify configure Can you guide me through this issue? Thanks.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
did you run npm install -g @aws-amplify/cli You may need to restart your terminal
@sachinbhatt1519
@sachinbhatt1519 3 жыл бұрын
I have one question: Do we need the Authentication for the Amplify Push Notification integration ?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
I've not worked with native apps so I've not used the push notification system before. I would think that you could still send a notification to an app that doesn't have an authenticated user. As long as you know the deviceID that you want to notify. As I said, I've not worked with Native or push notifications so this may not be the way it all works
@sachinbhatt1519
@sachinbhatt1519 3 жыл бұрын
@@CompleteCoding Thank you so much for replying
@CompleteCoding
@CompleteCoding 3 жыл бұрын
@@sachinbhatt1519 No problem!
@anupritakasbekar8172
@anupritakasbekar8172 2 жыл бұрын
i have followed every step which you shared but I am getting error Attempted import error: 'AmplifySignOut' is not exported from '@aws-amplify/ui-react'. I install amplify packages with @lastest version but still getting same error. can anyone guide me please
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Amplify has published a V2 of their npm package and it has a lot of changes. If you want to get it working you can just install v1 npm i @aws-amplify/ui-react@1.2.26 The other option is just creating a button that when clicked calls Auth.signOut() docs.amplify.aws/lib/auth/emailpassword/q/platform/js/#sign-out Or looking at the v2 docs and changing it to work with that
@groxiverde
@groxiverde Жыл бұрын
Nice video, but is there a way I can see and manage the list of users that have created an account in my amplify app?
@CompleteCoding
@CompleteCoding Жыл бұрын
You can see all your users in cognito in the AWS console. There are also apis for cognito of you wanted to build a 'users' view in your app
@groxiverde
@groxiverde Жыл бұрын
@@CompleteCoding thank you so much!!!
@Saswatxp
@Saswatxp 3 жыл бұрын
Hi sam I want to use aws Cognito for authentication without using aws amplify beacuse aws amplify cost more. Is it possible to do it?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
You shouldn't be paying any more to use Amplify. You only pay for the services that it uses. If you are talking about the amplify hosting then you don't have to use that. You can use the amplify SDK and then host the website in S3 yourself (Like I'm doing) If you really don't want to use amplify you can do everything without it. You can set up cognito and then use it as an authorisers on your APIs. You would have to create your own login and signup processes to securely work with Cognito
@PayalSingh-cr3ye
@PayalSingh-cr3ye 2 жыл бұрын
Is it possible to change or add validation for the input fields in reset password?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
I'm not sure if you can do that in the default UI but you can always create a custom UI, do all your own validation and then call the Amplify methods to set/reset the password and other fields.
@AryaPrakash28
@AryaPrakash28 Жыл бұрын
how to add multi tenancy login feature in react?
@sethcoast
@sethcoast 2 жыл бұрын
Does the authentication work when you try to actually deploy the web app on amplify?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Yes, just build your react app and then host it wherever you want.
@eduardodbarretejr
@eduardodbarretejr 3 жыл бұрын
can you add button for other social media account?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
I'll look into making a video showing you how to do that. Keep your eyes peeled for that.
@dodgecode3623
@dodgecode3623 3 жыл бұрын
can we connect the user to the database in aws
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Yes, you could add a new model in amplify for a user. You can then get and update the user as you have got and updated songs. Have a React hook that triggers once when the app loads to get the user.
@coderider9019
@coderider9019 3 жыл бұрын
What is the difference between this and hosted login ui?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
It looks like, behind the scenes, they are doing the same thing. It looks like you may be able to use the hosted login UI in some other ways too.
@jesusochoa6616
@jesusochoa6616 3 жыл бұрын
How we can customize that login form?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
I've got a video on that coming out tomorrow
@mrwho2513
@mrwho2513 2 жыл бұрын
how to configure it manually for multiple user pools?
@CompleteCoding
@CompleteCoding 2 жыл бұрын
I don't know if you can. You could have different deployments of the same app that point at different user pools, but I don't think you can have one app point at two pools.
@jdchannelviewer
@jdchannelviewer Жыл бұрын
Note: This tutorial is out of date.
@pranavbedre7841
@pranavbedre7841 3 ай бұрын
I am looking into using amplify and cognito for my project because I want to learn AWS. Can you mention which part is outdated so I can look for an alternative or should I switch to a different tutorial series?
@prabindahal3122
@prabindahal3122 3 жыл бұрын
I keep getting error ' Can't resolve './aws-exports'' any ideas? I followed the video.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Does the file exist? If not then you need to make sure you've done the Amplify init and setup. That will generate that file for you
@prabindahal3122
@prabindahal3122 3 жыл бұрын
@@CompleteCoding it was directly put under gitignore.
@sanjayl3627
@sanjayl3627 2 жыл бұрын
i have existing resource how can i add it
@CompleteCoding
@CompleteCoding Жыл бұрын
I don't think you can do this with amplify. If you find out how to then let us all know
@HoldenReed-qg1gi
@HoldenReed-qg1gi Жыл бұрын
Is this still relevant in 2023? Seems like a lot of the console has changed
@grizzle8911
@grizzle8911 2 ай бұрын
Using administrator access to do development is bad practise. Don't do this.
@jamescoholan
@jamescoholan 2 жыл бұрын
Great video, thank you!
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Glad you liked it!
@monalipatel6655
@monalipatel6655 Жыл бұрын
Can we add config file without amplify-cli With existing user?
@CompleteCoding
@CompleteCoding Жыл бұрын
Yes, You can manually add any of the config files you want.
Working with Data in DynamoDB from React with AWS Amplify - Full tutorial
43:10
Complete Coding - Master AWS Serverless
Рет қаралды 61 М.
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 2,6 МЛН
ПЕЙ МОЛОКО КАК ФОКУСНИК
00:37
Masomka
Рет қаралды 10 МЛН
AWS Amplify Authentication in React Native (Full tutorial)
48:40
notJust․dev
Рет қаралды 66 М.
I think I was wrong about AWS Amplify
30:39
Web Dev Cody
Рет қаралды 55 М.
AWS Amplify Fullstack Project Setup (React, Node, Lambda, REST API)
35:59
What is AWS Amplify? Pros and Cons?
8:04
Be A Better Dev
Рет қаралды 86 М.
5. AWS Amplify: Custom Authentication using the Amplify Auth API
21:01
Adding Cognito Prebuilt Signup and Login to your React App with AWS Amplify
12:59
AWS Amplify: Adding a RESTful backend to reactjs
21:34
Focus Otter
Рет қаралды 34 М.
What is AWS Amplify
12:51
Hitesh Choudhary
Рет қаралды 79 М.
Setup Google Auth with Amazon Cognito like a PRO!
20:34
Focus Otter
Рет қаралды 5 М.
Fiber kablo
0:15
Elektrik-Elektronik
Рет қаралды 7 МЛН
Xiaomi Note 13 Pro по безумной цене в России
0:43
Простые Технологии
Рет қаралды 1,9 МЛН
Обманет ли МЕНЯ компьютерный мастер?
20:48
Харчевников
Рет қаралды 188 М.
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Рет қаралды 1,5 МЛН
Kalem ile Apple Pen Nasıl Yapılır?😱
0:20
Safak Novruz
Рет қаралды 938 М.