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...
Great Tutorial! Very clear and easy to follow. Love the fact that it follows the article you wrote and you provided the link.
Glad you enjoyed it!
You're such a legend for this! Next JS + Amplify is an amazing combination
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.
Exactly I was searching for! Thanks Nader!
Was waiting for this. Thanks 🔥
super cool and the way you explained is exemplary.
It's very educational video. Thank you for the time to share that useful knowledge.
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.
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
Thanks for the video, i have a stupid question , why creating a page in pages folder instead of src
You rock Nader
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.
What VS code theme are you using? I really like it :)
@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
on running "amplify init", I get the following ERROR "'amplify' is not recognized as an internal or external command,
operable program or batch file."
You need to install the amplify command line. Try the following command: npm install -g @aws-amplify/cli
what zsh theme are you using?
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
This is close enough draculatheme.com/iterm
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
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"
@@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" ?
I'm using latest version of "next": "10.0.1",
@@sivaraj-v it will work well if instead of using "npm run dev", you do "npm run build" and then "npm start"