Fantastic! You saved my one week in only one hour. Gracious 🎉
@alexrusin25 күн бұрын
Great to hear! I'm glad I could help.
@qasimqadrii22 күн бұрын
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 🙏
@alexrusin19 күн бұрын
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.
@ReensBeanDip26 күн бұрын
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?
@alexrusin25 күн бұрын
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.
@veljkomaksimovic19 күн бұрын
Can you explain how to access the user in a server component, I cannot find that anywhere online :/
@alexrusin18 күн бұрын
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.
@Wisdomica2 ай бұрын
Thank you! One quick question, where is the full implementation repository? I only found the base project
@alexrusin2 ай бұрын
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
@Ziggy012014 күн бұрын
would it be possible to use cognitos self hosted UI for this?
@alexrusin12 күн бұрын
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.
@isaacowolabi66889 күн бұрын
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."
@alexrusin6 күн бұрын
Thank you. That is strange. I suggest checking your Cognito setup in AWS.
@johnmukendi765016 күн бұрын
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
@alexrusin12 күн бұрын
Try cloning the reference project from github and see if it works for you. Then you can compare it to your code.
@P13N-EАй бұрын
Great setup and thank you! however how to set up the httpOnly to true ?
@alexrusinАй бұрын
You are welcome!. Sorry, I'm not sure what you are referring to when saying "set up the httpOnly true"
@Bharath_Murugan2 ай бұрын
Awesome 🤙
@alexrusin2 ай бұрын
Thanks 🤗
@veljkomaksimovic19 күн бұрын
Why did you make nav-links.tsx client rendered. Couldn't that have been done on the server?
@alexrusin18 күн бұрын
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.