Problem with google chrome subdomain session only

I am having a weird issue with a google chrome subdomain session only. I have two subdomains a.mydomain.com and b.mydomain.com. if I first open a.mydomain.com in a browser and then open b.mydomain.com and log in from there, then I will not get a session in a.mydomain.com. But if I first log in from b.mydomain.co and then open a.mydomain.com. I get a session at a.mydomain.com.

I can’t solve it. Please, help

0
source share
3 answers

Look at the session cookies in your browser. What are the domain settings for them? Your sites may have different cookie settings. where site a sets the cookie .mydomain.com and site b sets b.mydomain.com , it prevents the cookie from appearing on site a .

0
source

stupid to me, found an answer so liked to share it

I used session.cookie_domain only for b.mydomain.com and not for a.mydomain.com

+1
source

Cookies will only be inherited when configured at one level higher. The cookie setting on example.com inherits it at www.example.com, foo.example.com, etc. Setting a cookie on www.example.com will not display a cookie for foo.example.com.

0
source

All Articles