• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

Cookie for multiple environments on the same root domain

Scheduled Pinned Locked Moved Unsolved
Q&A
2
2
658
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    robert.regnier
    last edited by 5 Jun 2025, 14:59

    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.

    M 1 Reply Last reply 5 Jun 2025, 15:24 Reply Quote 0
    • M
      mark.robustelli @robert.regnier
      last edited by 5 Jun 2025, 15:24

      @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?

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post