Symfony 5 Security / Authentication Tutorial

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

КОМЕНТАРІ • 59

  • @jasongoossens
    @jasongoossens 3 роки тому +8

    Thanks for the clear tutorial! Us junior devs really appreciate the level of detail!

  • @ВФедоров-ъ5ц
    @ВФедоров-ъ5ц 11 місяців тому

    I watched your videos about symfony. The courses on authorization and messenger turned out to be very interesting and useful.
    I hope that you will release a big course on Symfony Workflow.

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

    you are amazinggg thaaaanks a LOOOOOOTTTTT, i appreciate the level of details keep up the great work Gary

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

      Thanks a lot..much appreciated..and thanks for watching!

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

    AbstractGuardAuthenticator is deprecated, are you planning to make these again for symfony 5.3 ?
    It is gonna be really usefull and there is no content about that on youtube.
    Thanks for all of this by the way.

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

      Maybe for S6...I should have used the new auth system for this series really

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

      @@GaryClarkeTech I'll stick on symfony v5.2.99 for know then even though this video is a value for junior devs like me who is new on symfony. Thanks for your effort.

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

      @@happysongs1802 Glad I can help 👍

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

    It would be super cool if you would have time to make a course about Symfony API Platform. The one on symfony casts about cheeses is absolutely ridiculous and childish. I would also gladly buy a course like that on Udemy! Anyways ... Great content!!!

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

      Thanks Mihai...I appreciate it. I'm currently planning a Symfony API course..it will be paid but I'm gonna put some of the content on UA-cam such as API authentication for example

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

    Amazing video :D All things regarding symfony security in one place :D

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

      Skondensowana wiedza to co przekazuje Ryan w SymfonyCasts ;D

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

      @@garethfoxtrot5722 Możliwe, SymfonyCast dawno temu oglądałem :D

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

      @@pawecyrklaf4729 ja to co jakiś czas wracam i oglądam materiały aby zobaczyć co nowego przygotowali ;) aczkolwiek już po kilku latach pisania w Symfony, więcej się czerpie z dokumentacji i stackoverflow ;D

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

      @@garethfoxtrot5722 Mam dokładnie tak samo, jak coś szukam to dokumentacja lub stackoverflow, bo w tych kursach nie ma rzeczy, które po kilku latach pisaniach są nowością :D

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

      @@garethfoxtrot5722 Ogólnie to nic szałowego tam już nie ma, dobre miejsce dla kogoś kto dopiero zaczyna z Symfony. Niestety nie które kursy oparte są o SF2, więc trochę nie aktualne :D

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

    Hallo,
    thanks for your tutorial...
    How to prevent going back to the secured page after logout in symfony

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

      You can add invalidate_session: true under the logout key in security.yaml

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

      ​@@GaryClarkeTech Thanks a lot Gary.

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

      @@GaryClarkeTech Thanks but it's not working....

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

    Hey Gary hope you don't mind, I have another question for you 😅
    Do you know why the roles are prefixed with "ROLE_" string?
    Wouldn't it make more sense to call them something like "CAN_VIEW_ITEM", "IS_RESPONSIBLE_FOR_SOMETHING", etc.

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

      I'm afraid you've got no choice in that...that's how the core functionality was written, it's not something which you or me could change. The prefix is checked with each request and so having a fixed value makes sense I think.

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

    hi thank you for this wonderful tutorial
    i have one question
    fosuserbundle handle all the registration, login, reset password and more important it has good access control and it is easy to use.
    1. don't you recommend to use fosuserbundle instead?
    i know that it is not maintenance anymore.
    2. but is it going to be a problem in a project that it does not maintenance?
    thank you for answering

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

      Thanks for watching...I appreciate it.
      I never use anything that is no longer maintained and I don't think I've ever worked on a project that hasn't required maintenance.
      I'd always advise to follow best practices and stick with well maintained software.

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

    This is so freakin' amazing, cheers mate! :)

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

    Hey Gary, thank you for your tutorials!
    I was wondering is there a way to have multiple firewalls? One for customers and another for administrators, obviously those two being two separate entities

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

      You're welcome Anton, cheers. Yes, you can have multiple firewalls but it's not recommended...I think even the docs recommend against this or maybe it's something I heard Ryan Weaver saying.
      Any disctinctions you need to make between customers and admins can be done with one firewall using roles and permissions. I'd say keep it simple.

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

      ​@@GaryClarkeTech Yeah I've already implemented that and then saw your response 😅
      Is there any arguments against that? Because to me it seems very neat, can't find drawbacks in that setup.

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

    Hi, how do I create a list to show registered users? I'm learning symfony 5.3 as a beginner.

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

      Use a User repository to find the users you wish to display:
      www.doctrine-project.org/projects/doctrine-orm/en/2.9/reference/working-with-objects.html#by-simple-conditions
      Send the users to your view from your controller in a render method:
      symfony.com/doc/current/controller.html
      Then you can loop over your users and display the info about them in a twig template:
      {% for user in users %}
      {{ user.username }}
      {% endfor %}

  • @mytheon.gaming
    @mytheon.gaming Рік тому

    thanks

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

    I think the schickling/mailcatcher configuration is missed!

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

      Sorry about that!
      Here's my docker-compose
      version: '3'
      services:
      database:
      image: postgres:13-alpine
      volumes:
      - ./postgres:/var/lib/postgresql/data
      restart: always
      environment:
      POSTGRES_USER: main
      POSTGRES_PASSWORD: secret
      POSTGRES_DB: security_app
      ports: [5432]
      mailer:
      image: schickling/mailcatcher
      ports: [1025, 1080]

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

    What do you think about workflow and process in next series? :)

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

      I'll look at covering workflow at some point...I think I need to understand it a bit better myself first!

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

    Hello Gary, I hope you're doing well ! I started with mysql, so what should i change in docker-compose file ?

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

      If you're using mysql local to your machine, then remove the db entry from docker-compose

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

    awesome info. thanks

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

    how to fix the error Invalid credentials in symfony 5.3

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

    thanks!

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

    What can be done if the "composer req api" command does not work in symfony 6 ?

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

      Which package are you looking for? Try Packagist?

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

    Super 😘

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

    At time 32:45 :- Notice: Undefined variable: providerKey. this eroor comes, what is the problem.

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

      Think you must have missed a bit. It gets defined in the config.

  • @arkajyotidas2546
    @arkajyotidas2546 4 місяці тому

    Can anyone show me how to perform authentication in symfony 7, I am lost

    • @GaryClarkeTech
      @GaryClarkeTech  3 місяці тому

      Auth has changed quite a lot since I recorded this. I'd check out Symfonycasts or the documentation itself.

    • @arkajyotidas2546
      @arkajyotidas2546 3 місяці тому

      @@GaryClarkeTech thanks a lot sir, will be waiting for an update, btw your tutorials are very detailed, thanks for the efforts