Determining whether a Yii 1 app is logged in from an external app on the same domain

38 Views Asked by At

I have a Yii-1 app that runs in a subdomain, say app.example.com. My WordPress site uses the top-level domain (example.com). When a user comes to the wordpress site, I'd like to check whether the user is logged into the app. Recommendations? I can modify the Yii app login process to set a cookie in .example.com and check for it in a script on WordPress. Is there a better way?

1

There are 1 best solutions below

0
Damian Dziaduch On

How about adding a new route in your Yii app which return whether user is logged in or not?