Myth Auth LoginFilter Problem |
I just checked the Myth/Auth and he is adding the filter to separate routes not group route.
So maybe it will not work on group route. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-14-2020, 04:46 AM)ralphcabanero Wrote: Yes i did it already, and it is now working. Though i have a new issue on it. Whenever i logged with my username and password, the auth is not working, i have checked the database auth_login table and it was successfully logged in but upon checking on the CI dev toolbar the Auth says ¨Not logged in¨ and i cannot push through to the index page. YES, please share with the world how you fixed this issue, as I am ALSO having the same exact issue and error. Here are just three of the approaches I have tried, and NONE of these work: Code: $routes->group('', ['filter' => 'login'], function($routes) { Code: $routes->get('/dashboard', 'Games::dashboard', ['filter' => 'login']); Code: $routes->get('/dashboard', 'Games::dashboard', ['filter' => 'role:user']); My Filters.php file has all of the required $aliases, and I have defined the 'user' role in the auth_groups_users table, as well as have 'user' set as the $defaultUserGroup. I have confirmed that this works, but this is NOT the way this should be done: Code: // My Dashboard Any help would be appreciated. Thanks!
@PwrSrg it seems you are using the beta version of myth/auth. You must use the latest develop version. Since you are using composer, you can change your composer.json entry on myth/auth to look like:
Code: "myth/auth": "dev-develop" Code: "repositories": [ Then, just run composer update (01-05-2021, 11:43 PM)paulbalandan Wrote: @PwrSrg it seems you are using the beta version of myth/auth. You must use the latest develop version. Since you are using composer, you can change your composer.json entry on myth/auth to look like: YES, that was it! Wow, the greatest, most simple answer ever. ? I really wish developers would put this stuff in the README. Thank you!
I am getting the same 'ErrorException #64'
Codeigniter version 4.1.1 (fresh install) PHP 7.4.12 Myth/Auth 1.0-beta.3 I have the filter aliases. I am just trying the simplest implementation: added 'login' to the before globals. How did you resolve this?
@paulbalandan I have edited the composer.json entry in the root of my site and then tried to update Myth/Auth.
It asked for GitHub token which I gave it then I get this error: Code: Install of myth/auth failed I have confirmed that Xcode CLI tools are installed. Please help. what am I doing wrong? |
Welcome Guest, Not a member yet? Register Sign In |