I'm using the FOSUserBundle and I require the ability to login from 2 different routes(or more). These routes will have different templates and also login to different areas. The only thing that differs between the logins is the permission required. The routes will be something along the lines of
site.com/login
site.com/admin/login
and also possible site.com/ajax_login
I've been able to work out how to get different templates to render by ripping out everything but the CSRF token from the FOSUserBundle login.html.twig(that is overriden) then creating routes that render their own login boxes and also the login route(so that just the CSRF token gets rendered). This doesnt work for admin/login as the form posts back to login and if it fails it displays that page instead.
Is there any easy way to achieve this?