CodeIgniter Shield Installation and Overview

Поділитися
Вставка
  • Опубліковано 3 жов 2024
  • This video covers the installation of a new CodeIgniter 4 project with the new, official auth package, CodeIgniter Shield. It then follows up with an overview of some of the features.
    github.com/cod...
    You can help support me in development of things like CodeIgniter, Shield, and Bonfire (a drop-in admin area for CodeIgniter projects), but becoming a Patron at: / lonnieezell

КОМЕНТАРІ • 42

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

    I was waiting for shield tutorial so badly thanks 🙏🏾

  • @АлексейГрунин-б1е
    @АлексейГрунин-б1е 2 роки тому +1

    Thanks to Lonnie for the cool review - this is a very interesting functionality for me

  • @mnamhie
    @mnamhie Рік тому +1

    Thank you, Lonnie. You're amazing. You've done so much and you're so helpful. I love CI4, love Shield. Really, this is where I want to be. Thanks again, Lonnie.

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

    to be honest i don't understand well at the documentation because there's only few tutorial and poor explanation (because gap knowledge?) i'll not use shield probably i use it in the future maybe, but hi thanks for your tutorial it's really help me so much 😁

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

    Shield is such good work... Thank You!

  • @NullViewer
    @NullViewer 26 днів тому

    I'm looking a way, how to configure "system users". Like set of few users which are used just internally and who do not need any Auth functionality. One of such users could be "seeder". I know, I can just inject them into the table, but... could be nice to somehow configure that.

  • @mehai19
    @mehai19 8 місяців тому

    Shortcut tip, if you select the commented out text and do ctrl / command and ? it will auto un-comment or comment the text.

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

    I hope to see more tutorials about shield, probably with a full functioning application

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

      I hope to do some more. If you want to view a full application you can check out Bonfire - github.com/lonnieezell/Bonfire2

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

    thanks for the tutorial 👍

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

    Thanks Lonnie

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

    so good...! Thank you!

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

    Thanks a lot, great 🔥🔥

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

    Thank you for this tutorial. Could you do a tutorial on "CI Events"?

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

    great video, can you do, how user permission done? thanks

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

    Thank you for this. Could you explain in some way how to send xml message through CURLRequest.

  • @hyperannatv3387
    @hyperannatv3387 10 місяців тому

    May i know why did u put the project name folder inside the app base url(shield-play.test) in .env?

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

    well given

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

    Thak You!

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

    I have an issue with shield, last_active function is not working at all users active in app but last_active fields is always null... is there anything I can do for this?

  • @m.shahrim1933
    @m.shahrim1933 2 роки тому

    How are you able to have login page? When I installed Shield and ran the migration, I didn't have the login route.

  • @ghury1
    @ghury1 2 місяці тому

    how do i show the bottom toolbar? i have already set codeigniter 4 in development mode but it doesn't show

    • @ignitedcode3091
      @ignitedcode3091  2 місяці тому

      As long as your baseUrl is set to the domain you’re using (or correct port if you’re using localhost) and the Toolbar filter is uncommented it should show up.

  • @Rushikesh624
    @Rushikesh624 9 місяців тому

    @IgnitedCode How we create these database tables which you shown, can you please give me MySQL file

    • @lonnieezell
      @lonnieezell 9 місяців тому

      No need for a MySQL file - just run "php spark migrate --all" from the command line at the project root and it will be created.

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

    Thanks for the tutorial. Doesn't it has an api authentication with Bearer tokens?

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

      It comes with the Access Token handler which can be used for API authentication. github.com/codeigniter4/shield/blob/develop/docs/authentication.md#access-token-authenticator

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

      @@ignitedcode3091 yeah, I already saw it, but I was thinking about a jwt for a front-end app. This is more server side oriented

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

    wow incredible, question does shield will be JWT auth? like for APIRest apps?

    • @ignitedcode3091
      @ignitedcode3091  2 роки тому +2

      It doesn't currently support JWT out of the box, though I know one of the core contributors has started on a solution. Will take more work to get it where we want it but it will likely show up at some point. You can use the Access Tokens for API's, though it's a slightly different workflow.

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

      @@ignitedcode3091 cool thanks a lot man very cool work

  • @mediaghar
    @mediaghar 9 місяців тому

    Great tutorial!
    I just have one question. I have noticed that Shield hits the DB unnecessarily even to check if the user is logged in. For e.g. Auth()->loggedIn() or Auth()->getUser(). Pardon my ignorance, but traditionally after a successful login, the user object is stored and retrieved from the session and not overload the DB with get user queries just to check if the user has logged in. Is there a reason for this or am I missing something. We could have saved one expensive db query.

    • @ignitedcode3091
      @ignitedcode3091  9 місяців тому +1

      Sorry for the delay: You can turn `$recordActiveDate` to `false` and you should see that stop. github.com/codeigniter4/shield/blob/develop/src/Config/Auth.php#L168

    • @mediaghar
      @mediaghar 5 місяців тому

      @@ignitedcode3091 I saw the reply only today. Thanks and sorry. I just checked but it is already "false" in my case. Yet, every page visit, Shield runs the 2 DB queries to authenticate user and to get user details & roles. Why would it authenticate the user from DB in every page request? Not sure if its a problem in my config or I have hit a bug. Has anyone else faced this?

  • @ascomd.o.o.9663
    @ascomd.o.o.9663 Рік тому

    Thank you, Lonnie.
    Is there an option to prevent concurrent logins?

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

    Can DB sessions (CI_SESSION) be used with Shield?

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

      Yes, it uses CI's built-in session management, so it will work just fine that way.

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

      @@ignitedcode3091 OK, I asked because I tried using the DB session driver but I receive error "Unable to create file ci_session\..." and the CI_SESSION table is empty when I log in. I will check the forums. Thanks for the video.

  • @severn-master
    @severn-master Рік тому

    elon musk voice

  • @Doug_Diego_Cazadores_Cassidy

    Hi, i get an error, when trying to migrate: I dont get the db tables, created.
    Security Setup: Everything is fine.
    Run `spark migrate --all` now? [y, n]: y
    {
    "title": "Error",
    "type": "Error",
    "code": 500,
    "message": "Undefined constant \"CodeIgniter\\Database\\MySQLi\\MYSQLI_STORE_RESULT\"",
    "file": "C:\\project-root\\vendor\\codeigniter4\\framework\\system\\Database\\Database.php",
    "line": 137,
    "trace": [