Question

I just created a web reporting tool for customers, using the FOSUserBundle for authentication. I now want to develop an other reporting tool on the same server but with a different URI.

The user management will be the same. Do I really have to re-use the UserBundle I created before, or is there a way to authenticate my users using the first application ?

Thanks a lot :)

Pete

Was it helpful?

Solution

You may be interested by the host requirements in the routing file, take a look : http://symfony.com/doc/current/book/routing.html#adding-a-host-requirement

That means you can scope an entire bundle routing to a certain domain.

Don't specify host requirement to your fos user routing, it will works for every domains. Then override the login/register/... templates for each domain. You may need to override the controllers too. https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_controllers.md https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_templates.md

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top