
Ask HN: Why does Gmail sign in POST to accounts.youtube.com? - elamje
I have noticed for a while that when I login to Gmail via the multi-account selection screen, the sign in posts to accounts.youtube.com, while signing into youtube results in a post to accounts.google.com.<p>Do any googlers know why this decision has been made?<p>It makes me wonder GOOG makes any interesting infrastructure&#x2F;cost decisions based on how it will help their financials. E.g. have YouTube take the costs of providing certain services to the rest of Google, etc.
======
mbrukman
This was asked and answered on Web Applications.SE:
[https://webapps.stackexchange.com/questions/30254/why-
does-g...](https://webapps.stackexchange.com/questions/30254/why-does-gmail-
login-go-through-youtube-com)

> _When you log into a Google site like GMail, Google also logs you into all
> your various accounts Google accounts - such as YouTube. In order to be
> logged into a site, Google sets a cookie in your browser._

> _This is fine for most of their properties which are on the google.com
> domain (mail.google.com, docs.google.com, etc). However, a website can only
> set and read a cookie for its own domain - google.com can 't set a cookie
> for youtube.com. To get around this, as part of the login process Google
> will redirect you through accounts.youtube.com to log you into YouTube - and
> typically your country specific domain if you are outside the US (e.g. I get
> logged into google.com.au as well)._

------
duskwuff
This is used to implement a unified login across Google properties.

