I want to remain logged in when going to a different subdomain.
This used to work by adding .domain1.app in my site security cookie options.
Then if I am on sub.domain1.app and switch to different.domain1.app it kept me logged in.
However I’ve recently added another domain, lets call it domain2.shop.
This is how I’ve got my cookie options set up (no idea if I can actually use a comma delimiter?)
We would be very interested in knowing how this works.
In a recent attempt, we had to make the domain and security provider name both same to get the cookie to work accross-sub-domain. It took way too much of trial and error to figure out.
Just setting the domain, as you have, should just work I think.
Cookies don’t support multiple domains, to make it work over multiple domains you should create a cookie for each domain or set the domain dynamically. We currently don’t support that.
You cannot set cookies for other domains, allowing this would present an enormous security flaw. Also browsers block 3rd party cookies by default, so also using a hidden iframe will often not work.
@patrick As Sanjay has posted, this is what we did to make it work as @karh wants. In our two different Wappler apps, hosted under two sub-domains, but same primary domain.
So its sort-of supported by Wappler already.