Step-by-Step NextJS Auth Setup with AWS Cognito

  Рет қаралды 10,689

Alex Rusin

Alex Rusin

Күн бұрын

Пікірлер: 24
@DilwarHossainNoorChandan
@DilwarHossainNoorChandan 25 күн бұрын
Fantastic! You saved my one week in only one hour. Gracious 🎉
@alexrusin
@alexrusin 25 күн бұрын
Great to hear! I'm glad I could help.
@qasimqadrii
@qasimqadrii 22 күн бұрын
Wonderful, thank you sharing this, love the cognito server actions, will help alot. Tutorial request: would you mind creating a tutorial on turbo repo with shared shadcn components library between two nextjs projects, there are not enough information about that, would really appreciate that 🙏
@alexrusin
@alexrusin 19 күн бұрын
Thank you for the suggestion. Frankly speaking, I'm thinking about pivoting more into AWS. Doing tutorial on turbo repo is definitely a good idea as well.
@ReensBeanDip
@ReensBeanDip 26 күн бұрын
Could you help me understand how this is safe to use on the front end? Since it’s a client component, wouldn’t the envs be visible on the front end?
@alexrusin
@alexrusin 25 күн бұрын
Envs are user pool and client IDs. They are not secrets and can be stored on the frontend. Cognito's app client also has a secret. That secret should be stored securely on the backend.
@veljkomaksimovic
@veljkomaksimovic 19 күн бұрын
Can you explain how to access the user in a server component, I cannot find that anywhere online :/
@alexrusin
@alexrusin 18 күн бұрын
I think you can access it the same way we access it in the middleware const user = await authenticatedUser({ request, response });, but instead of request, response object you can put a cookie object as a context. On server side you can get cookies using Next cookies function.
@Wisdomica
@Wisdomica 2 ай бұрын
Thank you! One quick question, where is the full implementation repository? I only found the base project
@alexrusin
@alexrusin 2 ай бұрын
You are welcome! There are different branches in the repository corresponding to the parts of the video. The full implementation will be here: github.com/alexrusin/nextjs-cognito-auth/tree/5-reset-password-end
@Ziggy0120
@Ziggy0120 14 күн бұрын
would it be possible to use cognitos self hosted UI for this?
@alexrusin
@alexrusin 12 күн бұрын
You can use Cognito hosted UI, but not for this. Amplify package is used to help host your own UI rather than use Cognito's. Also, the flow will be a little bit different.
@isaacowolabi6688
@isaacowolabi6688 9 күн бұрын
Hi Alex, really comprehensive video. I have an issue, even after setting autoSignIn as true after confirmSignUp is called and next step is COMPLETE_AUTO_SIGN_IN. when I call authoSignIn(). i get this error "The autoSignIn flow has not started, or has been cancelled/completed."
@alexrusin
@alexrusin 6 күн бұрын
Thank you. That is strange. I suggest checking your Cognito setup in AWS.
@johnmukendi7650
@johnmukendi7650 16 күн бұрын
i can receive the current auth user on my client side but not on the server ,the user object returns null values ,I don't know what im doing wrong
@alexrusin
@alexrusin 12 күн бұрын
Try cloning the reference project from github and see if it works for you. Then you can compare it to your code.
@P13N-E
@P13N-E Ай бұрын
Great setup and thank you! however how to set up the httpOnly to true ?
@alexrusin
@alexrusin Ай бұрын
You are welcome!. Sorry, I'm not sure what you are referring to when saying "set up the httpOnly true"
@Bharath_Murugan
@Bharath_Murugan 2 ай бұрын
Awesome 🤙
@alexrusin
@alexrusin 2 ай бұрын
Thanks 🤗
@veljkomaksimovic
@veljkomaksimovic 19 күн бұрын
Why did you make nav-links.tsx client rendered. Couldn't that have been done on the server?
@alexrusin
@alexrusin 18 күн бұрын
Usually navigation is rendered on the client side. I didn't give it a second thought, frankly speaking. You can try generating it server side. However, you will have to get authenticated user server side as well. useAuthUser hook won't work.
AWS EC2 Security Groups: Essential Guide
14:17
Alex Rusin
Рет қаралды 33
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 20 МЛН
Harley Quinn's plan for revenge!!!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 32 МЛН
ПОМОГЛА НАЗЫВАЕТСЯ😂
00:20
Chapitosiki
Рет қаралды 28 МЛН
I think I was wrong about AWS Amplify
30:39
Web Dev Cody
Рет қаралды 58 М.
How This New Battery is Changing the Game
12:07
Undecided with Matt Ferrell
Рет қаралды 152 М.
Setup Google Auth with Amazon Cognito like a PRO!
20:34
Focus Otter
Рет қаралды 8 М.
7 Years of Software Engineering Advice in 18 Minutes
18:32
Next js 15 is Here… New Changes Again?!
8:13
JavaScript Mastery
Рет қаралды 143 М.
Getting Started With AWS Cloud | Step-by-Step Guide
23:54
Travis Media
Рет қаралды 75 М.
NextAuth.js + AWS Cognito Tutorial - Next.js Authentication
11:27
Evan Does Tech
Рет қаралды 28 М.
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 20 МЛН