Тёмный

Authentication in Angular- AuthGuard | CanActivate | Role Auth 

Let's Program
Подписаться 20 тыс.
Просмотров 72 тыс.
50% 1

How to implement Authentication and Authorization in Angular. By using AuthGuards we can restrict users to access the routes also we can configure it base on the Role of the user.
We take free Sessions on .Net Full stack training, if you guys are interested then you can join the telegram channel to get all the updates on training session.
Telegram Link: LET'S PROGRAM
t.me/letsprogramYt

Наука

Опубликовано:

 

16 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 88   
@deepakmoningi
@deepakmoningi Год назад
Every time ur proving that ur a real genius 👌👌
@rushikeshjadhav6838
@rushikeshjadhav6838 2 года назад
very helpful for me.thank you so much!
@vigneshsridhar7252
@vigneshsridhar7252 3 года назад
Bro really your videos more neat and clear... please post more videos bro... you get more viewers and subscribers.
@letsprogram30
@letsprogram30 3 года назад
Thanks you 🙂
@roman-tp6sd
@roman-tp6sd Год назад
Tnx from Argentina!
@kyleryxn
@kyleryxn 2 года назад
In which video of yours do you go over JWT with Angular?
@akashjitnayak6947
@akashjitnayak6947 Год назад
Nicely Explained.
@lucifer45227
@lucifer45227 Год назад
awesome explanation .. can you please let me know if it is possible to have 2 can-activate() in1 auth guard
@maestro4704
@maestro4704 2 года назад
Hey, where can I find the whole video, with local storage and the login functions. Thank you so much
@rajaaqib2912
@rajaaqib2912 2 года назад
great explanation
@suryaguthula6531
@suryaguthula6531 2 года назад
Thankyou Bro.awesome and very helpful video. Please make a video on Authentication &Authorization using JWT.Thankyou..
@lifetraveler8008
@lifetraveler8008 2 года назад
Thank you. Good explanation , very clear and precise
@letsprogram30
@letsprogram30 2 года назад
You're welcome 🙂
@venkatsai3741
@venkatsai3741 2 года назад
@@letsprogram30 bro can you send this project github link
@DK-1998
@DK-1998 2 года назад
Amazing!
@user-er6it2hx5b
@user-er6it2hx5b Год назад
The video was very helpful.
@letsprogram30
@letsprogram30 Год назад
Thank you thank you Do checkout my Blog : letsprogram.in
@junevue9665
@junevue9665 2 года назад
Which video is the video tht shows u already made the login, main, signup
@quicksees9773
@quicksees9773 Год назад
Thank YOu 😉
@letsprogram30
@letsprogram30 Год назад
Your welcome 🤗
@karthikreddy5854
@karthikreddy5854 Год назад
Keep Gng 💕👌
@ramzirihane3612
@ramzirihane3612 2 года назад
Hello , i have data register in database how i can replace "localstorage.getitem('token') ?
@Amrendersingh
@Amrendersingh 2 года назад
Sidhi baat no bakwas great. 👌
@letsprogram30
@letsprogram30 2 года назад
Haha thanks 🙂
@subitahai6330
@subitahai6330 3 года назад
Very good video, can I have the source code please?
@Careerquest2627
@Careerquest2627 2 года назад
Hi, this is very good one , but this is not matching with you previous login video, Please share git hub repo link.
@jurivjerdha2467
@jurivjerdha2467 Год назад
This is where you realise the hard part ins't coding but thinking your website out
@trustingod0
@trustingod0 2 года назад
I have had a lot of experience and training in developing software. I was taught as well as it makes sense to just hide functionality from a user if they do not have access to it. unless some functionality is disabled until a certain condition is met like in the case of a submit button being disabled untill the form fields are valid, it greatly irritates a user when you show functionality that they cant use. Its just a psychological phenomena. So how do I hide things based on a users Role?
@blueSurfer
@blueSurfer Год назад
you can use *ngIf with some conditions on div
@trustingod0
@trustingod0 Год назад
@@blueSurfer Thanks !!!
@ImranAhmed-yp2sj
@ImranAhmed-yp2sj Год назад
but admin can use, user components, how to deal with that?
@pranavkeshariya6049
@pranavkeshariya6049 2 года назад
How to create the login which u have created here
@javaandpythonmadeeasy4489
@javaandpythonmadeeasy4489 Год назад
Well explained 🤌
@AmitSingh-tf5yu
@AmitSingh-tf5yu Год назад
hlw sir firstly u have to create a page step by step or u provide code...then this video is usefull
@sudhakarkumar4553
@sudhakarkumar4553 3 года назад
please can u share the code
@bannerkong8847
@bannerkong8847 2 года назад
please put this full code in your description
@supriyasingh8477
@supriyasingh8477 2 года назад
😊😊😊
@codewithrohini1636
@codewithrohini1636 2 года назад
Where can I find the code?
@engineersexploring8543
@engineersexploring8543 Год назад
Hi brother Really nice video.. can I get access to the code ?
@khusikar676
@khusikar676 2 года назад
Hiii.... Can any one help me....??? Reactive form---- Curd... Select options.... I m not abl to edit and bind the select.... Plz help me..... ☹️☹️☹️☹️
@siphamandlakelengeshe6646
@siphamandlakelengeshe6646 Год назад
Hi. Great tutorial! I just have one problem, when a user is on dashboard page and they remove the /dashboard, i want it to not work and take them back to dashboard. How do i do that?
@shibshankarpadhy783
@shibshankarpadhy783 Год назад
You can use the router Service to navigate to any page that you like
@ranaumer3076
@ranaumer3076 3 года назад
Bro can you please share the source code
@bharathgorental4928
@bharathgorental4928 2 года назад
this is awesome, but Can you please tell me If I want to restrict a user from a specific HTML element / typescript method/ function inside the component(some functions/ elements should be accessible but some should not), thank you.
@letsprogram30
@letsprogram30 2 года назад
You should use access modifier to achieve this
@prabhumath
@prabhumath 2 года назад
follow the same tutorial and just add ngif to component u want to hide and call canActivate() like this: *ngIf="authGuard.canActivate()" , also import authguard in component.ts
@nkyeeanot1347
@nkyeeanot1347 3 года назад
Very Helpful.. Thanks :)
@letsprogram30
@letsprogram30 3 года назад
You're welcome 😊
@jayakumar2927
@jayakumar2927 3 года назад
Telegram not to working
@brownwolfgaming4773
@brownwolfgaming4773 2 года назад
what backend stack do you use?
@letsprogram30
@letsprogram30 2 года назад
It's just fake creation without backend, just explained about what to do in frontend side
@PrudhviRoyals
@PrudhviRoyals Месяц назад
How can we hide the about,contactus Component , instead of giving alert ?
@letsprogram30
@letsprogram30 Месяц назад
Just make use that condition inside the template to hide and show using ngIf
@mahdiayari9165
@mahdiayari9165 Год назад
geat work !! source code please
@emad_arnesto9175
@emad_arnesto9175 Год назад
can i make this method with keycloak authentification?
@letsprogram30
@letsprogram30 Год назад
Yes you can
@krish8847
@krish8847 Год назад
can u show me full source code for login and signup?
@malativanjarapu6115
@malativanjarapu6115 Год назад
Can you please send me the source code of this
@rajkumars4950
@rajkumars4950 2 года назад
Hi, i don't want show about us , contact page to other users. How can I do that?
@letsprogram30
@letsprogram30 2 года назад
Just check and store the session who has logged in and you can use *ngIf to hide
@roopalimattolia5921
@roopalimattolia5921 2 года назад
Can I do this if i have logged in using json-server ?? Please reply me... I need help
@letsprogram30
@letsprogram30 2 года назад
Yes
@roopalimattolia5921
@roopalimattolia5921 2 года назад
@@letsprogram30 But I don't have token there .. what should I do ?
@AnkitYadav-xd3pi
@AnkitYadav-xd3pi 3 года назад
This video is only for auth guards, please upload video for whole login functionality
@letsprogram30
@letsprogram30 3 года назад
Sure will include that in next video
@aissatouseye1958
@aissatouseye1958 Год назад
@@letsprogram30 i hope so
@s.balaji5016
@s.balaji5016 2 года назад
When I clicked logout still the token is present? And it going to main page. Have you faced this and solution please?
@letsprogram30
@letsprogram30 2 года назад
On logout method Just do localstorage.clear()
@s.balaji5016
@s.balaji5016 2 года назад
@@letsprogram30 thank you very much for your quick response
@letsprogram30
@letsprogram30 2 года назад
@@s.balaji5016 you're welcome 🙂
@jeetadhikari3629
@jeetadhikari3629 10 месяцев назад
Nice, but I think there is an issue. User can just put a random invalid jwt token in the localstorage through browser console, and will have access to internal pages. Rather, it is better to have an async auth guard, that will call the api with the jwt token, and if the token is valid, only then the auth guard will return true.
@letsprogram30
@letsprogram30 10 месяцев назад
This is just for the demo purpose where there was no backend involved 🙂
@jeetadhikari3629
@jeetadhikari3629 10 месяцев назад
@@letsprogram30 Yeah that makes sense indeed. May be its better to mention about this in your videos though, otherwise people end up making unsecured apps :D Btw, dont get me wrong, I am just giving feedback from audience POV. Great videos !
@letsprogram30
@letsprogram30 10 месяцев назад
@@jeetadhikari3629 I highly appreciate your feedback bro🙂 I will make sure next time to mention the same🙂🙏
@sahilhadvani4424
@sahilhadvani4424 2 года назад
Hello, full project login with CRUD operation. 🙏🙏🙏
@letsprogram30
@letsprogram30 2 года назад
I do have video created on above mentioned topics
@workrelated851
@workrelated851 3 года назад
bro can share you project on github
@maestro4704
@maestro4704 2 года назад
is there a link to this?
@sateeshgedela7234
@sateeshgedela7234 2 года назад
Hi. Where is the code
@sateeshgedela7234
@sateeshgedela7234 2 года назад
Please provide entire code
@jack007jamesbond
@jack007jamesbond 3 года назад
Source code? for the UI. The other video was good.
@letsprogram30
@letsprogram30 3 года назад
Connect with me on telegram
@benankit2341
@benankit2341 Год назад
Please add GitHub link also.
@letsprogram30
@letsprogram30 Год назад
Soon I am adding GitHub links for all th videos
@aissatouseye1958
@aissatouseye1958 Год назад
@@letsprogram30 hurry up
@mikha2880
@mikha2880 2 года назад
what backend stack do you use?
@letsprogram30
@letsprogram30 2 года назад
It's just fake creation without backend, just explained about what to do in frontend side
@mikha2880
@mikha2880 2 года назад
@@letsprogram30 oh i see, thank you my friend
Далее
Auth Does NOT Have To Be Hard
17:13
Просмотров 96 тыс.
Can Activate guard | Guards in angular | Angular 16
21:55
CanActivate Route Guard - Angular (Tutorial #24)
11:58
iPhone 15 Pro в реальной жизни
24:07
Просмотров 334 тыс.