Now Myth:Auth uses $reservedRoutes config variable to generate content of Myth's routes.php file and users can customize it.
In AuthController.php file we can find many redirects to the named routes, like
return redirect()->to(route_to('reset-password') inside attemptLogin() method
return redirect()->route('login')->with('message', lang('Auth.activationSuccess')); inside attemptRegister() method
return redirect()->route('login')->with('error', lang('Auth.forgotDisabled')); inside forgotPassword() method
return redirect()->route('reset-password')->with('message', lang('Auth.forgotEmailSent')); inside attemptForgot() method
return redirect()->route('login')->with('error', lang('Auth.forgotDisabled')); inside resetPassword() method and so on.
So all this will work well until user customize $reservedRoutes config variable. For example if user changes default
then the above listed named route redirects with redirect()->route('login') and redirect()->route('reset-password') will fail.
I think all use cases should be replaced with $reservedRoutes config values.
Or am i missing something?
Now Myth:Auth uses $reservedRoutes config variable to generate content of Myth's routes.php file and users can customize it. In AuthController.php file we can find many redirects to the named routes, like
return redirect()->to(route_to('reset-password')
inside attemptLogin() methodreturn redirect()->route('login')->with('message', lang('Auth.activationSuccess'));
inside attemptRegister() methodreturn redirect()->route('login')->with('error', lang('Auth.forgotDisabled'));
inside forgotPassword() methodreturn redirect()->route('reset-password')->with('message', lang('Auth.forgotEmailSent'));
inside attemptForgot() methodreturn redirect()->route('login')->with('error', lang('Auth.forgotDisabled'));
inside resetPassword() method and so on.So all this will work well until user customize $reservedRoutes config variable. For example if user changes default
to
then the above listed named route redirects with
redirect()->route('login')
andredirect()->route('reset-password')
will fail. I think all use cases should be replaced with $reservedRoutes config values. Or am i missing something?