I'm working on a web application which actually consists of two applications under the hood. One application is called account
and handles all things related to user accounts such authentication, registration and management of the account. I also have an application we'll just call web
.
The thing is that account
listens on https://account.domain.com using SSL/TLS, and web listens on http://www.domain.com.
What options do I have for having people log in and authenticate account.domain.com
and then redirecting them to www.domain.com
where they're actually then logged in. As far as I know, you can't set up a cookie on account.domain.com
and then have it work on domain.com
as that would be a security risk.
Some background details about my applications:
Written in the Go programming language.
Makes use of the Gorilla Toolkit for most of the HTTP/HTTPS interfacing, URL routing and handling POST/GET parameters.
Both applications live on the same virtual server.
What I'm looking for is a secure way to authenticate and manage a session across all subdomains of and the actual domain domain.com
. I'm not particularly well versed in this subject, so aside from setting cookies, I don't know much.