In my Rails 4 app, I have a form sitting on a domain that follows this format - http://dev.example.com. The action of the form is set to POST to a different domain - https://admin.example.com. In that POST, my controller action sets a cookie to sign in the current user. That is all working as expected. I can print out cookies[:remember_token] and current_user. However, when I redirect to another page on https://admin.example.com, I lose my remember_token cookie which causes my current_user lookup to fail.
Is this expected behavior for cookies? I know cookies are attached to domains, but I would think my remember_token cookie would live with the admin domain, and a redirect to the admin domain would retain the cookie. Please let me know if this question doesn't make sense and I can provide more information. Thanks in advance for any advice!