Myth Auth LoginFilter Problem |
Does anyone here encountered this issue as mine?
PHP Code: [b]Fatal error[/b]: Declaration of Myth\Auth\Filters\LoginFilter::before(CodeIgniter\HTTP\RequestInterface $request) must be compatible with CodeIgniter\Filters\FilterInterface::before(CodeIgniter\HTTP\RequestInterface $request, $arguments = NULL) in [b]/var/www/charlzsys/vendor/myth/auth/src/Filters/LoginFilter.php[/b] on line [b]24[/b] app/config/Routes.php PHP Code: $routes->group('', ['filter' => 'login'], function($routes) { app/config/Filters.php PHP Code: <?php namespace Config;
Did you download the newest Myth/Auth and CodeIgniter both have been updated.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Did you add all the settings to the files?
Restrict routes based on their URI pattern by editing app/Config/Filters.php and adding them to the $filters array, e.g.: PHP Code: public filters = [ Or restrict your entire site by adding the LoginFilter to the $globals array: PHP Code: public $globals = [ Restricting a single route Any single route can be restricted by adding the filter option to the last parameter in any of the route definition methods: PHP Code: $routes->get('admin/users', 'UserController::index', ['filter' => 'permission:manage-user']) The filter can be either role or permission, which restricts the route by either group or permission. You must add a comma-separated list of groups or permissions to check the logged in user against. Restricting Route Groups In the same way, entire groups of routes can be restricted within the group() method: PHP Code: $routes->group('admin', ['filter' => 'role:admin,superadmin'], function($routes) { What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
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.
Check you session data to see what it says you could be over write or clearing it some place.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Here is what i see on my session data:
Session User Data __ci_last_regenerate 1600175570 redirect_url http://192.168.254.202:83/login _ci_previous_url http://192.168.254.202:83/login
That's strange because I'' am using it on my blog login and it redirects me to login then to my front page.
But I have mine on the route not the group route. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Yeah it is really strange for me also, i tried to reinstall from scratch both CI 4.0.4 and myth-auth and still it is not working. here's the screen record of mine: https://drive.google.com/file/d/1foGzlnm...b9705/view
(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.How you solved the issue, plz share.. I'm facing the same issue. |
Welcome Guest, Not a member yet? Register Sign In |