The Complete Guide to Next.js Authentication with AWS

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2024
  • In this video you'll learn how to implement authentication in a Nextjs app using AWS Amplify and Amazon Cognito. We will cover everything from SSR authentication, SSR redirects, protected routes, client-side redirects, and authenticating a request in an API route.
    The tutorial that goes along with this video is located here: dev.to/dabit3/...
    The code for this video is located here: github.com/dab...

Комментарии • 27

  • @MrDuah
    @MrDuah 4 года назад +3

    Great Tutorial! Very clear and easy to follow. Love the fact that it follows the article you wrote and you provided the link.

  • @danielstill5625
    @danielstill5625 4 года назад +2

    You're such a legend for this! Next JS + Amplify is an amazing combination

  • @ApoorvMote
    @ApoorvMote 4 года назад +5

    Thank you for video demo. I prefer it over reading article. I hope there is sequal coming for using appsync/graphql with NextJS and deployment to Amplify.

  • @anselm94
    @anselm94 3 года назад

    Exactly I was searching for! Thanks Nader!

  • @ApurvKhare
    @ApurvKhare 4 года назад +3

    Was waiting for this. Thanks 🔥

  • @randomlife3050
    @randomlife3050 4 года назад +3

    super cool and the way you explained is exemplary.

  • @tatemo_labs
    @tatemo_labs 4 года назад +1

    It's very educational video. Thank you for the time to share that useful knowledge.

  • @principe.borodin
    @principe.borodin 3 года назад

    How use the amplify with next-auth without the amplify authenticator component? Actually the api not recogniize the user authenticated, same using credentials provider and authenticated with amplify auth.

  • @amansingh3347
    @amansingh3347 3 года назад +1

    I'm getting Error on profile.js page as
    Unhandled Runtime Error
    Error: Element type is invalid: expected a string (for built-in
    components) or a class/function (for composite components) but got:
    undefined. You likely forgot to export your component from the file it's
    defined in, or you might have mixed up default and named imports.
    Check the render method of `Profile`.
    Please help

  • @bacemsmiri795
    @bacemsmiri795 3 года назад

    Thanks for the video, i have a stupid question , why creating a page in pages folder instead of src

  • @mathws1
    @mathws1 4 года назад

    You rock Nader

  • @khandoor7228
    @khandoor7228 4 года назад

    Hey Nader, when creating an Amplify project is there any way to create it in a separate environment, either separate VPC or Organization or something? Im just thinking if I were to make several projects I would want to have some logical separation, especially for running metrics, alarms, costs all that sort of thing. I dont see that in any of the configuration steps. I guess i could add tags to the various components. I looked it up in the Amplify docs and didnt see anything.

  • @seanknowles5309
    @seanknowles5309 4 года назад

    What VS code theme are you using? I really like it :)

  • @Smile-to2ii
    @Smile-to2ii 4 года назад

    @dabit3 Bro, Question For AWS amplify Live Streaming! How Will I deploy it to the server? And how my server will know about my PC? seems like anyone would be able to stream on this code, or the CLI installed on the laptop makes a connection? What about authorization?
    Thanks

  • @jayrathod532
    @jayrathod532 3 года назад

    on running "amplify init", I get the following ERROR "'amplify' is not recognized as an internal or external command,
    operable program or batch file."

    • @mstibbard
      @mstibbard 3 года назад

      You need to install the amplify command line. Try the following command: npm install -g @aws-amplify/cli

  • @ghouston2712
    @ghouston2712 4 года назад +1

    what zsh theme are you using?

    • @naderdabit
      @naderdabit  4 года назад

      Yo, custom theme! Pink, purple, green, and orange are the main colors. It took me a while to play around with it and get it there, don't remember exactly how I got it like this tbh lol.. I'm using iTerm2

    • @amirm7461
      @amirm7461 4 года назад

      This is close enough draculatheme.com/iterm

  • @sivaraj-v
    @sivaraj-v 4 года назад

    Application is slow, how to make it much faster in next.js and amplify ?? + protected.js throw error, user not authenticated
    Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

    • @naderdabit
      @naderdabit  4 года назад +1

      Hey, I'm working in dev mode so it's a lot slower than if you run a build "npm run build" and the start it locally "npm start"

    • @sivaraj-v
      @sivaraj-v 4 года назад +1

      @@naderdabit Thanks for guidance for making me to understand :-) Do you have any update on "protected.js throw error, user not authenticated
      Error [ERR_HTTP_HEADERS_SENT] Error" ?

    • @sivaraj-v
      @sivaraj-v 4 года назад +1

      I'm using latest version of "next": "10.0.1",

    • @trasherPL
      @trasherPL 4 года назад +1

      @@sivaraj-v it will work well if instead of using "npm run dev", you do "npm run build" and then "npm start"