Maintaining Session in Subdomain

In my app I have a regular domain https://example.com and I redirect the https://mobile.example.com if on mobile. How can I persist the session between the two subdomains?