Any way to check if client is logged in for subdomain redirect?

I want to move an app from Service.com to a subdomain like app.Service.com.

In order to make this transition easy for everyone, I’d like to redirect visitors of Service.com to app.Service.com if they had already been logged in on Service.com prior to the subdomain switch. What would be the best way to check this client-side on Service.com (which is just a static page)? Is there a reliable browser cookie? Is there something that I can add before the switch that I can track after the switch?

I know that they still would have to log in on app.Service.com after the redirect, but that’s okay as long as they can be redirected to it.


Edited Domain.com to “Service.com” to try to clarify that it’s the same root domain.

2 Likes

this blog post seems to discuss a solution.