Authentication in Angular- AuthGuard | CanActivate | Role Auth

Поділитися
Вставка

КОМЕНТАРІ •

  • @vigneshsridhar7252
    @vigneshsridhar7252 3 роки тому +5

    Bro really your videos more neat and clear... please post more videos bro... you get more viewers and subscribers.

  • @deepakmoningi
    @deepakmoningi 2 роки тому

    Every time ur proving that ur a real genius 👌👌

  • @roman-tp6sd
    @roman-tp6sd 2 роки тому

    Tnx from Argentina!

  • @kyleryxn
    @kyleryxn 2 роки тому +1

    In which video of yours do you go over JWT with Angular?

  • @trustingod0
    @trustingod0 3 роки тому +7

    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 2 роки тому +5

      you can use *ngIf with some conditions on div

    • @trustingod0
      @trustingod0 2 роки тому

      @@blueSurfer Thanks !!!

  • @SiwarGorrab
    @SiwarGorrab Рік тому

    The video was very helpful.

    • @letsprogram30
      @letsprogram30  Рік тому

      Thank you thank you
      Do checkout my Blog : letsprogram.in

  • @akashjitnayak6947
    @akashjitnayak6947 Рік тому

    Nicely Explained.

  • @lifetraveler8008
    @lifetraveler8008 2 роки тому +1

    Thank you. Good explanation , very clear and precise

    • @letsprogram30
      @letsprogram30  2 роки тому +1

      You're welcome 🙂

    • @venkatsai3741
      @venkatsai3741 2 роки тому

      @@letsprogram30 bro can you send this project github link

  • @maestro4704
    @maestro4704 3 роки тому +1

    Hey, where can I find the whole video, with local storage and the login functions. Thank you so much

  • @Amrendersingh
    @Amrendersingh 2 роки тому

    Sidhi baat no bakwas great. 👌

  • @16vula-vala
    @16vula-vala Рік тому +1

    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

  • @lucifer45227
    @lucifer45227 2 роки тому

    awesome explanation .. can you please let me know if it is possible to have 2 can-activate() in1 auth guard

  • @suryaguthula6531
    @suryaguthula6531 2 роки тому

    Thankyou Bro.awesome and very helpful video. Please make a video on Authentication &Authorization using JWT.Thankyou..

  • @rushikeshjadhav6838
    @rushikeshjadhav6838 3 роки тому

    very helpful for me.thank you so much!

  • @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.

  • @karthikreddy5854
    @karthikreddy5854 Рік тому

    Keep Gng 💕👌

  • @junevue9665
    @junevue9665 3 роки тому

    Which video is the video tht shows u already made the login, main, signup

  • @ImranAhmed-yp2sj
    @ImranAhmed-yp2sj 2 роки тому

    but admin can use,
    user components, how to deal with that?

  • @rajaaqib2912
    @rajaaqib2912 2 роки тому

    great explanation

  • @ramzirihane3612
    @ramzirihane3612 2 роки тому

    Hello , i have data register in database how i can replace "localstorage.getitem('token') ?

  • @quicksees9773
    @quicksees9773 2 роки тому +1

    Thank YOu 😉

  • @bharathgorental4928
    @bharathgorental4928 3 роки тому

    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  3 роки тому

      You should use access modifier to achieve this

    • @prabhumath
      @prabhumath 2 роки тому +1

      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

  • @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

  • @AmitSingh-tf5yu
    @AmitSingh-tf5yu 2 роки тому

    hlw sir firstly u have to create a page step by step or u provide code...then this video is usefull

  • @jurivjerdha2467
    @jurivjerdha2467 2 роки тому

    This is where you realise the hard part ins't coding but thinking your website out

  • @PrudhviRoyals
    @PrudhviRoyals 6 місяців тому

    How can we hide the about,contactus Component , instead of giving alert ?

    • @letsprogram30
      @letsprogram30  6 місяців тому +1

      Just make use that condition inside the template to hide and show using ngIf

  • @subitahai6330
    @subitahai6330 3 роки тому +2

    Very good video, can I have the source code please?

  • @jeetadhikari3629
    @jeetadhikari3629 Рік тому

    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  Рік тому

      This is just for the demo purpose where there was no backend involved 🙂

    • @jeetadhikari3629
      @jeetadhikari3629 Рік тому

      @@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  Рік тому

      @@jeetadhikari3629 I highly appreciate your feedback bro🙂
      I will make sure next time to mention the same🙂🙏

  • @pranavkeshariya6049
    @pranavkeshariya6049 2 роки тому

    How to create the login which u have created here

  • @AnkitYadav-xd3pi
    @AnkitYadav-xd3pi 3 роки тому +1

    This video is only for auth guards, please upload video for whole login functionality

  • @jayakumar2927
    @jayakumar2927 3 роки тому +1

    Telegram not to working

  • @emad_arnesto9175
    @emad_arnesto9175 2 роки тому

    can i make this method with keycloak authentification?

  • @codewithrohini1636
    @codewithrohini1636 2 роки тому

    Where can I find the code?

  • @sudhakarkumar4553
    @sudhakarkumar4553 3 роки тому +1

    please can u share the code

  • @ranaumer3076
    @ranaumer3076 3 роки тому +2

    Bro can you please share the source code

  • @roopalimattolia5921
    @roopalimattolia5921 2 роки тому

    Can I do this if i have logged in using json-server ?? Please reply me... I need help

  • @bannerkong8847
    @bannerkong8847 2 роки тому

    please put this full code in your description

  • @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 роки тому +1

      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 🙂

  • @khusikar676
    @khusikar676 3 роки тому

    Hiii....
    Can any one help me....???
    Reactive form----
    Curd...
    Select options....
    I m not abl to edit and bind the select....
    Plz help me..... ☹️☹️☹️☹️

  • @javaandpythonmadeeasy4489
    @javaandpythonmadeeasy4489 Рік тому

    Well explained 🤌

  • @engineersexploring8543
    @engineersexploring8543 2 роки тому

    Hi brother Really nice video.. can I get access to the code ?

  • @rajkumars4950
    @rajkumars4950 3 роки тому

    Hi, i don't want show about us , contact page to other users. How can I do that?

    • @letsprogram30
      @letsprogram30  3 роки тому

      Just check and store the session who has logged in and you can use *ngIf to hide

  • @DK-1998
    @DK-1998 2 роки тому

    Amazing!

  • @nkyeeanot1347
    @nkyeeanot1347 3 роки тому

    Very Helpful.. Thanks :)

  • @krish8847
    @krish8847 2 роки тому

    can u show me full source code for login and signup?

  • @sahilhadvani4424
    @sahilhadvani4424 2 роки тому

    Hello, full project login with CRUD operation. 🙏🙏🙏

    • @letsprogram30
      @letsprogram30  2 роки тому

      I do have video created on above mentioned topics

  • @sateeshgedela7234
    @sateeshgedela7234 3 роки тому

    Hi. Where is the code

  • @malativanjarapu6115
    @malativanjarapu6115 2 роки тому

    Can you please send me the source code of this

  • @benankit2341
    @benankit2341 2 роки тому

    Please add GitHub link also.

  • @jack007jamesbond
    @jack007jamesbond 3 роки тому

    Source code? for the UI.
    The other video was good.

  • @workrelated851
    @workrelated851 3 роки тому

    bro can share you project on github

  • @mahdiayari9165
    @mahdiayari9165 2 роки тому

    geat work !! source code please

  • @supriyasingh8477
    @supriyasingh8477 3 роки тому

    😊😊😊

  • @mikha2880
    @mikha2880 2 роки тому +1

    what backend stack do you use?

    • @letsprogram30
      @letsprogram30  2 роки тому +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