![]() |
Shield problem redirecting in hosting - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34) +--- Thread: Shield problem redirecting in hosting (/showthread.php?tid=93009) |
Shield problem redirecting in hosting - pippuccio76 - 06-13-2025 Hi , i have an application that work fine in localhost . I upload file on hosting but when i try to login with shield it return on login page without error message , if i see log i have : INFO - 2025-06-13 15:53:33 --> REDIRECTED ROUTE at https://mysite.it/login it seem that not save user session: __ci_last_regenerate|i:1749823269;csrf_test_name|s:32:"06d7c9016ed344db8ac20881c5c05d79";_ci_previous_url|s:38:"https://mysite.it/index.php/login"; wath can i do ? RE: Shield problem redirecting in hosting - pippuccio76 - 06-13-2025 i try debug , i insert in LoginController in the method loginAction a log: log_message('info', 'Inside login action'); but in log there isn't this message it seem that does'nt redirect to login action... RE: Shield problem redirecting in hosting - luckmoshy - 06-13-2025 inspect your permission and user group. Lever shield: use these RE: Shield problem redirecting in hosting - pippuccio76 - 06-14-2025 (06-13-2025, 07:07 PM)luckmoshy Wrote: inspect your permission and user group. Lever shield: use these I don't tink it's a permission problem , this is method in config/auth Code: public function loginRedirect(): string and this is route : Code: $routes->group('admin', ['filter' => 'permission:admin.access', 'namespace' => 'App\Controllers\Admin'], function ($routes) { in db i have two user 1 superadmin 1 admin i try to remove 'filter' => 'permission:admin.access', but it redirect always on login RE: Shield problem redirecting in hosting - JustJohnQ - 06-14-2025 Is the session set? Also, this line looks unnecessary: PHP Code: $url = $session->getTempdata('beforeLoginUrl') ?? setting('Auth.redirects')['login']; PHP Code: public function loginRedirect(): string RE: Shield problem redirecting in hosting - InsiteFX - 06-14-2025 Check your Auth.php Config file and check your redirects in it. Also make sure that your time zone is set correct. RE: Shield problem redirecting in hosting - pippuccio76 - 06-14-2025 (06-14-2025, 02:02 AM)InsiteFX Wrote: Check your Auth.php Config file and check your redirects in it. this is the time : public string $appTimezone = 'Europe/Rome'; the auth redirect is posted over: Code: public function loginRedirect(): string but it seem doesn't work login : INFO - 2025-06-14 12:25:46 --> Inside login view DEBUG - 2025-06-14 12:25:46 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver. i don't have in log User logged or user not logged RE: Shield problem redirecting in hosting - InsiteFX - 06-14-2025 Did you check the loginAttemps table to see if they were logged in? Note This redirect happens after the specified action is complete. In the case of register or login, it might not happen immediately. For example, if you have any Auth Actions specified, they will be redirected when those actions are completed successfully. If no Auth Actions are specified, they will be redirected immediately after registration or login. RE: Shield problem redirecting in hosting - InsiteFX - 06-18-2025 Also check in Config\app.php the uriProtocol you may try different ones sometimes this can cause problems if not set correctly. PHP Code: /** |