How to Implement Ionic 4 Role Based Authentication Routing

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 53

  • @KiranPatel8
    @KiranPatel8 2 года назад

    You are awesome in the way you teach concepts. You think like a "humble" programmer which makes the learning experience much more easy. Great job with all your videos on Ionic. Do you have same tutorials with latest versions of Ionic/Angular and other dependencies. It becomes difficult to follow along and implement your tutorial code with current versions.

    • @galaxies_dev
      @galaxies_dev  2 года назад

      Thank you so much for the kind words Kiran! I'm currently working on a new version for these concepts :)

  • @nehaarora976
    @nehaarora976 5 лет назад

    You are helping us so much by making these tutorials....doing great job

  • @GlennNickens
    @GlennNickens 3 года назад

    DUDE! You are AWESOME!!!!!

  • @bharathravi7820
    @bharathravi7820 4 года назад +2

    clean! and beautiful. Thanks!

  • @arj1411
    @arj1411 5 лет назад +3

    Thanks for the nice tutorial. I have a request. Could you please make a video on how to handle Hardware Back button in Ionic4? There are so many issues on that action. It won't close side menu...

  • @avijitguria.6880
    @avijitguria.6880 5 лет назад +1

    very nice video, very helpful

  • @zafarali3817
    @zafarali3817 5 лет назад

    Awesome video, very helpful as always

  • @haniqudsi
    @haniqudsi 4 года назад

    Awesome as always,,, Thanks

  • @mauriciorosero7604
    @mauriciorosero7604 4 года назад +1

    excelente, me ha servido mucho este vídeo, muchas gracias

  • @marceloansaldi9331
    @marceloansaldi9331 4 года назад +1

    Nice video man, really helpful. But im having this problem where "return of(user);" doesnt work for me. the error says " cannot find name 'of' " (on auth.service.ts). could you tell me what am i doing wrong?

    • @galaxies_dev
      @galaxies_dev  4 года назад

      You need to import it from the rxjs package!

  • @jonathanperry7530
    @jonathanperry7530 5 лет назад

    Fantastic video!! Really helpful :)

  • @Vietnamcamping89
    @Vietnamcamping89 5 лет назад +1

    Just awesome :)

  • @alahmad430
    @alahmad430 5 лет назад +2

    Sir, can you make tutorial how to make ionic 3 with SQLite multiple table with transaction, foreign key etc? I can't find anywhere

  • @danielhalmstrand2123
    @danielhalmstrand2123 5 лет назад

    Thank you Simon for a great and relevant topic. I just wonder if we could save the logic with details of roles of users online in the cloud as uou know that logic in the front=end could be altered by any user.

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Hmm good question. I think it might work but would involve a lot of RxJS and making sure you first get the roles from your server before you do anything inside your app!

  • @edwardfabianbaron6616
    @edwardfabianbaron6616 5 лет назад

    Thanks, this really helps me! Good videos

  • @syedmaroof
    @syedmaroof 5 лет назад

    Hi Simon, Can we do this using the firebase as well?

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Yes it might work a bit different but works as well!

  • @ChannelAbinyaMuhammad
    @ChannelAbinyaMuhammad 5 лет назад +1

    Thanks Sir

  • @ddcooper19
    @ddcooper19 5 лет назад +1

    Gracias Simmon

  • @mohamedabdelrahman7717
    @mohamedabdelrahman7717 5 лет назад

    nice tutorial i have only one question what if token expired i think we should check stored object from local storage in auth Guard not this.auth.user because if token expired this.auth.user still valid correct me if i am wrong

    • @galaxies_dev
      @galaxies_dev  5 лет назад +2

      Yes this was an easy example, checking the expiry date is also mandatory for any authentication implementation!

    • @mohamedabdelrahman7717
      @mohamedabdelrahman7717 5 лет назад

      @@galaxies_dev how to implement session like backend when user is idle log him out

  • @booija
    @booija 3 года назад

    Is this option also possible if you use canLoad

    • @galaxies_dev
      @galaxies_dev  3 года назад

      Yes canLoad and canActivate should both work fine!

    • @booija
      @booija 3 года назад

      @@galaxies_dev Is it also possible to read the data in the canLoad to check whether the page may be loaded.
      Or that is only possible with the canActivate.
      For example, to check whether a role matches the data of the url

    • @booija
      @booija 3 года назад

      I got it working.

  • @amirulsyahmimansor9078
    @amirulsyahmimansor9078 4 года назад

    hi simon, is there anyway that we can do this with firebase? if so, how?

    • @galaxies_dev
      @galaxies_dev  4 года назад

      Sure, we have courses on that topic inside the Ionic Academy as well. You can also use the new AngularFireGuard which makes life a lot easier!

  • @anony124
    @anony124 Год назад

    what if someone with a user role changed localstorage and changed the role value to admin , he could access admin route , how to make it more secure ?

    • @galaxies_dev
      @galaxies_dev  Год назад

      Real security should always happen at your API level where you check the token of a user!

    • @anony124
      @anony124 Год назад

      @@galaxies_dev good to know , thx!

  • @alhassankiwamdeen7252
    @alhassankiwamdeen7252 5 лет назад

    Awesome! and first to comment.

  • @mindarentillosa1146
    @mindarentillosa1146 5 лет назад

    error filter(response => response) is not assignable to parameter of type

  • @amanahmed9910
    @amanahmed9910 4 года назад

    Cannot read property 'role' of null

  • @yatindradhurwe7297
    @yatindradhurwe7297 5 лет назад

    sir how to concate two *ngFor Array in single Array? sorry my question is not related to this video

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      You can use concat() to combine to array inside Javascript!

  • @HelmarBaechle
    @HelmarBaechle 5 лет назад

    Hi Simon ,
    I am unable to update my App created with Ionic and deployed on Firebase
    come2athens.web.app/
    I have made some minor changes but it does not apply when using
    ionic cordova build firebase --prod --verbose
    please assist
    Best regards
    Helmar

    • @galaxies_dev
      @galaxies_dev  5 лет назад +1

      Hey Helmar, not sure what's wrong :/ Does it look different with Ionic serve? Most likely some caching issue, are you using a service worker perhaps?

    • @HelmarBaechle
      @HelmarBaechle 5 лет назад

      @@galaxies_dev sorted now. I have used the command : ionic build --prod and it works. Thanks for the reply

    • @HelmarBaechle
      @HelmarBaechle 5 лет назад

      @@galaxies_dev sorted now. I have used ionic build --prod and it works.
      Thanks for the response

  • @christiandumaog5946
    @christiandumaog5946 5 лет назад

    error cant resolve './../../services/auth.service'

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      That means your path is incorrect.

  • @rishabhkumar8376
    @rishabhkumar8376 5 лет назад

    Simon you couldn't reply to my question....?

  • @ddcooper19
    @ddcooper19 5 лет назад

    Gracias Simmon