Cookie for multiple environments on the same root domain
-
We have a couple of environments at the moment dev and prod with the dev FusionAuth instance listening at accounts.domain.com and accounts.dev.domain.com. Because FusionAuth only uses the base domain to set its cookies, the cookies created when logging in to accounts.dev.domain.com are used to SSO into accounts.domain.com which causes confusion and problems. We could purchase a new domain (domain.dev for example) to ensure the cookies don't bleed over but feels like this should be a common scenario with an easier solution that I'm not seeing at the moment. Any guidance here would be appreciated.
-
@robert-regnier Unfortunately, it looks FusionAuth does not support this. I did find an
open issue that you may want to upvote if it is in fact the same issue you are experiencing.You may also want to check out this blog. It talks about a custom domain using one of FusionAuth's hosting packages, but think it should work in your case as well.
Does anyone else have a similar setup? How did you implement it?