I use FOSUserBundle and I need the ability to log in from two different routes (or more). These routes will have different patterns, as well as entrance to different areas. The only thing that differs between the inputs is the required resolution. Routes will be something like strings
site.com/login
site.com/admin/login
and possibly site.com/ajax_login
I managed to figure out how to get various templates for rendering by pulling everything except the CSRF token from the FOSUserBundle login.html.twig file (which is overloaded), then creating routes that display their own login fields, as well as the login login (so that only CSRF marker gets rendered). This does not work for the administrator / login, as the form returns to the login, and if it fails, it displays this page instead.
Is there an easy way to achieve this?
source
share