CodeIgniter Forums
Myth:Auth redirecting does not work - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Myth:Auth redirecting does not work (/showthread.php?tid=79877)



Myth:Auth redirecting does not work - ahmadsiddeeq0 - 08-08-2021

hi i installed myth:auth library . every thing works but when i go to login page after i successfully logged in it should redirec me to the root uri and not showing the login form ?
is it a bug or it is something that i have to implement , some times it works sometimes it does not !!!


RE: Myth:Auth redirecting does not work - paliz - 08-08-2021

[quote pid="389194" dateline="1628427049"]
use filter to redirect to anothor ctl

https://codeigniter4.github.io/userguide/incoming/filters.html
[/quote]


RE: Myth:Auth redirecting does not work - ikesela - 08-08-2021

you can force redirect at AuthController.php

look at => function attemptLogin()


RE: Myth:Auth redirecting does not work - InsiteFX - 08-09-2021

For any of the Auth systems out there you should use a filter to redirect to another controller.


RE: Myth:Auth redirecting does not work - ahmadsiddeeq0 - 08-09-2021

(08-08-2021, 10:55 AM)paliz Wrote: [quote pid="389194" dateline="1628427049"]
use filter to redirect to anothor ctl

https://codeigniter4.github.io/userguide/incoming/filters.html

[/quote]

i just want to know if this is normal or should i make it by my self


RE: Myth:Auth redirecting does not work - ahmadsiddeeq0 - 08-09-2021

(08-08-2021, 12:40 PM)ikesela Wrote: you can force redirect at AuthController.php

look at => function attemptLogin()

so that is normal right


RE: Myth:Auth redirecting does not work - ahmadsiddeeq0 - 08-09-2021

(08-09-2021, 12:53 AM)InsiteFX Wrote: For any of the Auth systems out there you should use a filter to redirect to another controller.

oh i see beacuse i thought the auth will do it automatically


RE: Myth:Auth redirecting does not work - InsiteFX - 08-10-2021

It will go back to the page that called it like home.

Or use a named route and route_to