Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> since google.com and youtube.com are two different websites

Both are part of Google.



The web platform does not have a concept of companies. There are origins, domains, and websites. As I said, logins in browsers are tied to websites.


I do not think that is true. How do you stay signed into google even though you restart a browser? There is a cookie that is stored and it authenticates you. When you first go to yt.com, it can ask google to authenticate you.. Call a url at google.com with a unique id and the response from that URL will tell yt if you are already signed in. The call to google can authenticate you since the call is coming from a google.com domain.

I am not sure if this is the exact mechanism.. but thinking that everything is origins, domains and websites and ignoring the fact that websites can call other websites (without making it obvious to the user) and they are all interconnected is a very naive assumption.


> Call a url at google.com with a unique id and the response from that URL will tell yt if you are already signed in.

I don’t think this is possible. When Google.com receives an HTTP request from Youtube.com, Google cannot know which user it is because the user visited Youtube.com anonymously.


If you open youtube.com in a private window, it does not auto-login as expected. Maybe, I am misunderstanding your question?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: