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.
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.
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.
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
@@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?
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?
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.
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 😁
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.
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
@@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.
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": [