Search code examples
symfony1sfguard

Multiple apps, single login?


My symfony project is divided into several apps. Using the sfDoctrineGuard plugin I'd like to create another app just for login, and redirect to the appropriate app after login.

  • Is this advisable or does it go against how sfGuard is supposed to work?
  • Is there a way to redirect between applications without hardcoding the entire url? Is there a "symfony way" of doing it, or is this not how projects are supposed to function?

(All I can find is this thread which is kind of vague on the specifics.)


Solution

    • I think it doesn't. Symfony uses the same session for both users (frontend and backend) so just use the same sfBasicSecurityUser class (the same myUser class)
    • You probably need Cross Application Links. I've already used this tutorial and it works perfectly!