Vue Navigation Guards (AWS Amplify/Cognito User Auth)
HTML-код
- Опубликовано: 21 май 2022
- In this video you will learn how to set up navigation guards on your Vue project. You will also learn how to set up AWS Amplify to allow authenticated users the ability to access different routes.
Here is a link to a site that helped me learn more about this.
router.vuejs.org/guide/advanc...
Thanks! Наука
thanks for the vid, very helpful. I wonder how/where did you learn all of this? any course you can recommend for vue+aws applications? I am just starting out with Vue and want to use AWS for my infrastructure. I am a bit lost more I am reading about this.
Thank you for video. If I am understood correct the protected routs are only for ''visual' protection, because we are speaking about frontend part, i.e. user could alter the code and load protected component (the attacker could request from the API directly without a JS client). So the main question is how to protect backend... for example how to protect access to database in Vue with using Cognito. If you could record such video, I would be very grateful.
That is a great point! I'll put together a video going over securing the api as well. Thanks for the comment 👍
New video up! I go over how to secure your API Gateway with a Cognito user pool. Check it out. Let me know what you think!
ruclips.net/video/z4ExxuXl6lg/видео.html
could you please specify package versions you use for amplify? I have a problem reproducing the code, to get it to work
it works for me with older packages: "@aws-amplify/ui-components": "^1.7.2",
"amplify": "^0.0.11",
great how can i get jwt?
If you set up aws amplify the jwt should be in your user data! Let me know if that helps or not. I believe I made a video on this. I will check. If not I will make a video on it this week.
@@devspot3864 thanks
code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-project@2.0.251
npm ERR! Found: aws-amplify@5.0.5
npm ERR! node_modules/aws-amplify
npm ERR! aws-amplify@"^5.0.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer aws-amplify@"3.x.x || 4.x.x" from @aws-amplify/ui-components@1.9.40
npm ERR! node_modules/@aws-amplify/ui-components
npm ERR! @aws-amplify/ui-components@"*" from the root project
Is your package.json in the correct location?
I had the same error, solution was to install older packages. For me it worked with "@aws-amplify/ui-components": "^1.7.2",
"amplify": "^0.0.11",