AWS Cognito Tutorial Part III | Session persistence & change password

Поділитися
Вставка
  • Опубліковано 29 бер 2019
  • This is part III of the AWS Cognito tutorial series. Join us in this tutorial as we finish up integration of AWS Cognito and AWS Amplify in our client app and also wire up our forgot password and change password pages.
    Here is the 'Hexal Energy' starter app for this tutorial:
    github.com/jspruance/aws-cogn...
    AWS Amplify auth documentation:
    aws-amplify.github.io/docs/js...
    AWS Cognito:
    aws.amazon.com/cognito/
    Completed tutorial code:
    github.com/jspruance/aws-cogn...
  • Наука та технологія

КОМЕНТАРІ • 95

  • @JoeMcTri
    @JoeMcTri 4 роки тому +1

    This three part series was great. I'm new to Amplify and React, and I was able to follow and update a site I'm building to use this. Thanks.

  • @Protocoding
    @Protocoding 3 роки тому

    Amazing video. I thought I would try Cognito for auth this time around and this tutorial is the best I've seen. Watched all three and have everything set up and ready to rock! Thanks again!

  • @arooly
    @arooly 4 роки тому +3

    Outstanding tutorial, very clear very easy to follow. I appreciate a lot the start and final code on github.

  • @yugandharsudini1940
    @yugandharsudini1940 3 роки тому

    Hi Jonathan, I have followed all 3 parts and the tutorial is very clear. Thank you for organizing so well. This course helped me a lot. I appreciate for sharing your knowledge and coding skills. Thanks again!

  • @PantaYou
    @PantaYou 4 роки тому +7

    Thank you Jonathan. I Followed all 3 parts, very clear, helped me a lot.

  • @Vicheanak
    @Vicheanak 4 роки тому +1

    Yeah, I followed all 3 parts, very informative and quite helpful to my new project.

  • @nealvip
    @nealvip 4 роки тому

    I love your series of AWS serverless :D easy to follow and focus in popular services of AWS for web development.

  • @patrickmutuku4450
    @patrickmutuku4450 4 роки тому

    Clear enough for me to follow this as I make my Python + Django cognito backend. Thanks.

  • @raffaelrameh14
    @raffaelrameh14 4 роки тому +2

    Thank you for this very useful video series! It helped a lot!

  • @dustybest5775
    @dustybest5775 4 роки тому +1

    That's another awesome tutorial. I love your work man.

  • @davidboyd234
    @davidboyd234 4 роки тому

    Great 3 part series! Got to be the best Cognito example due to the integration with Hexal (UI). It would be great (at least for me :-) if you did a 4th video that demonstrated the workflow of "Only allow administrators to create users" and had the Administrator send out email invitations for people to join the site. I've looked for such examples to no avail.

  • @SameeraAbeywickrama
    @SameeraAbeywickrama 5 років тому +16

    Hey... this is a very useful video and your channel is full of helpful content. Could you do a video on Role base access control using cognito. A sytem such as a blog which might have different type of users like admin, moderators, authors, readers etc.

    • @TheMoosaChannel
      @TheMoosaChannel 5 років тому +4

      Yes I need that too. I need a video as to how multiple apps can be accessed after logged in one bar. Sharing the session with other apps such as Single Sign-on.

  • @jhred3315
    @jhred3315 3 роки тому

    perfect! This video helps me out! Very Very useful!

  • @macmacmac740
    @macmacmac740 4 роки тому

    Great series. I am starting a new project which is completely based on AWS and implements various AWS services. I had previously worked on Firebase and there isn't much different between Firebase and AWS.
    I will follow all your tutorials on AWS as it surely going to help me a lot.
    Liked and subscribed and shared.
    Thanks!

  • @lonesareer
    @lonesareer 4 роки тому

    thanks for an excellent video and with lucid explaination , it is great learning experience

  • @raulalejandromunozaraya3878
    @raulalejandromunozaraya3878 4 роки тому

    Awesome course, thanks a lot!

  • @finppp
    @finppp 5 років тому

    Nice tutorial. Thanks!

  • @JS-Oasis
    @JS-Oasis 5 років тому +1

    It is a very good guide, thanks for this!

  • @manideepreddy7672
    @manideepreddy7672 3 роки тому

    Thank you very much, helped me a lot. :)

  • @scuba-dou
    @scuba-dou 4 роки тому

    Thanks a lot, really, you should do more stuff like this

  • @felixin02
    @felixin02 5 років тому

    Great tutorial, helped me a lot. I do not think it was long because you explained really well all the steps. Just one thing, In the tutorial you use the path '/changepasswordconfirmation' but in the starter app code the path is '/changepasswordconfirm'

    • @BlockExplorerMedia
      @BlockExplorerMedia  5 років тому +1

      hey Felix thanks for letting me know - this is now updated in the repo!

  • @sumodsivadas6959
    @sumodsivadas6959 Рік тому

    This one saved my day

  • @silvioli5336
    @silvioli5336 3 роки тому +1

    Hello Jonathan. First of all, I would like to thank you for this amazing Cognito series, I gained a lot of knowledge from this.
    I do have one issue which is out of the scope of this series, but I hope you are able to help me out: I build the application and put into s3 as static website. Whenever I click on "Login" or "Register" it throws a 404 error but doesn't give any pointers as to where the issue is. Do you have a video addressing this or do you know what I am missing? Thanks a lot!

  • @StephenRayner
    @StephenRayner 3 роки тому

    Excellent! Thank you. It’s been a year since you made a video. Such a tragedy, I hope you are well and come back soon.

  • @boxexify
    @boxexify 2 роки тому

    Thanks for the amazing tutorials! Btw should you check first if not empty the variable “session“ before setAuthStatus to true in app.js -> componentDidMount?
    Thank you!

  • @jurijssolovjovs3575
    @jurijssolovjovs3575 4 роки тому

    thank you very much man !

  • @ppmedel
    @ppmedel 3 роки тому

    thanks you're great!!

  • @vijaybabaria3253
    @vijaybabaria3253 4 роки тому

    Great walkthrough, is it possible to create or migrate this code to react native to support mobile app development? Thanks a lot for sharing

  • @ikikika
    @ikikika 4 роки тому

    thanks Cloud Path for this series of tutorial. Perhaps you could continue on this series by doing something about protected routes? thanks.

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому +2

      great suggestion. i'll try to queue that up for a possible video as time permits!

  • @user-gg5jq3ty1c
    @user-gg5jq3ty1c 5 років тому

    Thanks a lot. Can you make a tutorial about preventing multiple simultaneous login to cognito?

  • @Az.flex86
    @Az.flex86 3 роки тому

    Very nice and the descriptions are very clear. do you have a tutorial about how to add the cognito User group data to DynamoDb? Thank alot

  • @SimonaTocci
    @SimonaTocci 4 роки тому +2

    All very interesting but the pages are always accessible, both by the user logged in and by the user not logged in. So the system does not protect pages from free access. The purpose of authentication is to direct the user to reserved pages. How can it be done?

  • @user-varmat
    @user-varmat 3 роки тому

    It was cool )

  • @andreatorres4847
    @andreatorres4847 3 роки тому

    Thank you! But I have a question... How can I expire the session after 1 hour of inactivity? I can continue using the application even the next day and don't know how to force the user to authenticate again.

  • @lute248
    @lute248 2 роки тому

    Hi, thanks for the tutorial. I was wondering how do i go about rerouting the navigation so that if unauthenticated user tries entering the url such as the /products or /admin, they get redirected to the sign up page instead? currently your app only hides the buttons for unauthennticated users but they can still access it if they enter the URL

  • @chansong6831
    @chansong6831 4 роки тому +2

    This is very good to me. Thank you so much. By the way, all menus in hexal pages can be accessible, even if not logged in status. So, can you show us how to hide all menus, except for Home and login page, when users are not logged in. Or role base access control system.

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому +3

      put this on my to do list - thanks!

    • @lute248
      @lute248 2 роки тому

      @@BlockExplorerMedia any updates on this? i also want to know

  • @noname6573
    @noname6573 3 роки тому

    How authorization in the backend works? Do you use cognito in the backend as well?

  • @shahabemami4275
    @shahabemami4275 5 років тому +1

    thank you, sir, for your video.
    what if we use currentAuthenticatedUser whenever we need the information of user?
    and if get an error we know that user is not log in anymore so we send him to login page

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому

      yes that's the ideal approach. this code should be in 'app.js' for this tutorial.

  • @akshayverma6570
    @akshayverma6570 Рік тому

    Hello
    Is there a way we can set a validation that the new password that we are setting during forget password flow cant be same as the current password
    similar to the change password flow ?

  • @marlonmcbride6293
    @marlonmcbride6293 5 років тому +1

    Cloud Path, if I simply want a login page using Cognito do I need all of your code? I don't want to allow registration, or the forgot password functionality. I plan on creating the user in the AWS console just to test the login functionality.

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому

      no you don't need all of it - just the config code and the login page - you can leave the rest out!

  • @tanmayrane858
    @tanmayrane858 3 роки тому

    Greate tutorial !! how to upload this to Amplify and connect to Cognito?

  • @jamiedusa
    @jamiedusa 5 років тому

    Saved me hours of "not so light" reading. Thanks very much! Do you have any tutorials on the implementing Federal Identities (FaceBook) etc?

    • @BlockExplorerMedia
      @BlockExplorerMedia  5 років тому +2

      That's my goal! Nothing yet on role federation but I'll consider covering that in the future - thanks!

    • @jamiedusa
      @jamiedusa 5 років тому

      @@BlockExplorerMedia Thanks much! Quick question: Now that React's Context API is released, would you recommend using it for session management across pages as opposed to passing auth vars via props?

    • @BlockExplorerMedia
      @BlockExplorerMedia  5 років тому +3

      You know, I haven't looked into the Context API yet. Passing props down (and back up) through multiple levels was always my biggest pain point with React though so I'm excited to check this out - thanks for the heads up!

  • @TheMoosaChannel
    @TheMoosaChannel 5 років тому

    After I logged in, username uses user ID like hex code not regular. Also, after logged in, I clicked on any link, it is logged out automatically and session does not remain.

  • @felixin02
    @felixin02 4 роки тому +1

    Hey JSpru, i used your tutorial and everything is working fine but i have one question. When i create a product, Where does this product info is stored? Thanks

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому +1

      hey Felix. the product data is just stored in React state in this example, so just on the client side. that's why whenever you restart the application any new data is gone. in a real world app, you'd want to go the extra step to persist the data in a database.

    • @felixin02
      @felixin02 4 роки тому +1

      @@BlockExplorerMedia thank you for the quick answer, i will use dynamoDB for it

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому

      @@felixin02 great choice!

  • @rogerl5518
    @rogerl5518 5 років тому +1

    Hello! I have a suggestion.
    It would be very useful if you consider to make a tutorial about AWS Step Functions and how to communicate them with Lambada Functions.
    May be in future another about how to trigger a lambada function from another.
    This because is very very hard to find information and examples about this topics at internet. Thanks!

    • @ikikika
      @ikikika 4 роки тому +1

      i used sns (simple notification service) to trigger a lambda from another lambda function. i got the idea from this article dev.to/adnanrahic/a-crash-course-on-serverless-with-aws---triggering-lambda-with-sns-messaging-30nf

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому

      great suggestion. i haven't covered step functions yet - will add that to my todo list

  • @jonsnow1435
    @jonsnow1435 3 роки тому

    The change password in the documentation needs another parameter access token how to tackle with that?

  • @deepakthankachan8443
    @deepakthankachan8443 3 роки тому

    Can't the details like pool id, client id etc. be read from source code since this app lives on the browser and be used by say another app to sign up users?

  • @damodaragottipalli5484
    @damodaragottipalli5484 3 роки тому

    Good. very useful. But how to deploy this in s3 as a static website

  • @MrDjegsi
    @MrDjegsi 4 роки тому

    Very Very good tutorial, thanks man, can l use your tutorial in free tier ?!

  • @pocps9448
    @pocps9448 3 роки тому

    I am not receiving verification code after forgot password. Do I have to make any changes in cognito?
    Is there any document to migrate users from auth0 to Cognito without letting users know? Or will you be able to make a video on this? Thanks

  • @johnm287
    @johnm287 2 роки тому +1

    Are there any courses that you can recommend for learning React?

    • @BlockExplorerMedia
      @BlockExplorerMedia  2 роки тому

      Check out React courses by Brad Traversy on UA-cam and elsewhere. He is a pretty awesome teacher.

  • @veaarthur3655
    @veaarthur3655 4 роки тому +1

    My logout button doesn't redirect back to the homepage, is this because of the preventDefault invocation in handleLogOut?

    • @veaarthur3655
      @veaarthur3655 4 роки тому +1

      Example: If user is at admin page and logs out, I still see admin page, I'd rather it redirect back home after the log out.

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому

      i think it's just because I never implemented a redirect in the handleLogOut function. great idea though I will try to add that asap.

    • @lute248
      @lute248 2 роки тому

      @@BlockExplorerMedia did you manage to add it?

  • @Saptisunil
    @Saptisunil 2 роки тому

    Hey ! While i login i am able to get unrecognisable lambda output ! Can u help me solve this

  • @Saptisunil
    @Saptisunil 3 роки тому

    Good tutorial ! But i am not able to login it shows “ unrecognisable lambda output “ ! Can u please help me to solve it ? Thanks in advance

  • @vasudevvalke772
    @vasudevvalke772 3 роки тому

    How to convert PDF to password protected PDF and attach it to email using AWS SES?

  • @2412rockify
    @2412rockify 3 роки тому

    This is not going to work if your user's account status is FORCE_CHANGE_PASSWORD. Please make a video of how to implement that part as well, because currently, you can only do that by using Cognito hosted UI.

  • @manikandans8808
    @manikandans8808 4 роки тому +1

    What are limits in Congnito Can you pls explain?

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому

      probably just the fact that you are tied into the AWS ecosystem - however that can also be looked at as an advantage, as their massive, worldwide network, power and security is leveraged.

  • @shvang8
    @shvang8 3 роки тому

    Hi Thanks for this amazing content. Thanks a lot I am facing this issue
    ./src/components/Navbar.js
    Line 60: 'handleLogOut' is not defined no-undef
    Search for the keywords to learn more about each error.
    Please help me out. Thanks in advance !!

    • @kycic
      @kycic 2 роки тому

      this.handleLogOut as shown in the Completed code.

  • @TheMoosaChannel
    @TheMoosaChannel 5 років тому

    Also, ChangePassword function does not work. Error says "Not authenicated". Anyone helps?

    • @ikikika
      @ikikika 4 роки тому

      maybe u can log in as a user first, then try going to the /changepassword route to change your password

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому

      yes, you must be logged in first

  • @muhammadsharif5526
    @muhammadsharif5526 4 роки тому

    Hey boss, why have you stopped making more videos like this please make some more interesting videos please please

  • @andrewmartinez8340
    @andrewmartinez8340 4 роки тому +1

    theres so much boilerplate code in react. im glad i ditched it in favor of vue

    • @BlockExplorerMedia
      @BlockExplorerMedia  4 роки тому

      I haven't used vue yet...need to check it out. React definitely has it's drawbacks.

  • @toilnblood
    @toilnblood 3 роки тому

    great videos.
    Forgot password change and change password sends the passwords in clear text. can see it in clear text in the header request payload:
    PreviousPassword: "Cde456&*(", ProposedPassword: "Abc123$%^",…}
    AccessToken: ""
    PreviousPassword: "Cde456&*("
    ProposedPassword: "Abc123$%^"

  • @TheMoosaChannel
    @TheMoosaChannel 5 років тому

    Even Forgot Password does not work. There is nothing when clicking on Submit.

  • @johnhajek1176
    @johnhajek1176 4 роки тому

    It’s hilarious seeing all these fake names on here of people who don’t trust their spouses or whatever other reasons for this crap

  • @anonimous__ho
    @anonimous__ho 3 роки тому

    don't understand why are you teaching people stuff if you yourself write it like a complete beginner...