KayueWordpressBundle icon indicating copy to clipboard operation
KayueWordpressBundle copied to clipboard

SF2 interaction with "real" wordpress blog

Open barat opened this issue 11 years ago • 3 comments

Hi,

I don't know if this is only a bonus, but:

  • I installed wordpress in my test.loc domain, and symfony in sub.test.loc
  • I've set logged_in_key and logged_in_salt in config.yml to same as in wp-config.php

And:

  • When I login/logout on Acme Demo Bundle it works on Symfony side
  • when I'm loging/logout via wordpres (wp-login.php) then I'm logged in/out in both (WP and SF2)
  • when I'm logged in via wp-login.php I can't logout on symfony side (Im still logged in)
  • when I'm logged in via Symfony I'm not automaticly logged in "real" Wordpress

So ... it's almost SSO ... from Wordpress on main domain I can login/logout from both applications, but from Symfony (Your bundle) I can only login/logout from SF2 (on WP I'm still logged off). Is there a way to make Your bundle both-sides SSO?

barat avatar Oct 08 '13 13:10 barat

This sounds like a setting issue to me, as SSO is very strict about cookie settings. You might want to open your browser's debug console and compare the cookie WordPress created and the cookie Symfony created.

Please also note that signing in via Symfony won't grant you access to WordPress admin as the admin page require a different cookie.

kayue avatar Oct 12 '13 15:10 kayue

Please double check the cookie_path and cookie_domain setting in Symfony config, they are essential and easy to go wrong. They should match with WordPress's login cookie. I recommend you to use developer console to inspect the cookie WordPress creates.

kayue avatar Oct 12 '13 15:10 kayue

@barat did you find any solution for your issue ??

ahmed-hamdy90 avatar Dec 22 '13 18:12 ahmed-hamdy90