I am interested in how a browser manages secure sessions. As I understand it this is the scenario when logging into a google account:
1) Browser (B) and google Server (S) perform a handshake to create a secure session by encrypting http traffic using TLS or SSL.
2) User (U) enters log in details
3) U is authenticated
4) U opens a tab to youtube, and is provided with an option to sign in using their google account.
5) U uses their google account, but is not required to enter any details as their browser still has a secure session with their google account.
My question is, how is steps 4-5 performed with respect to the browser, how does the webpage like youtube hoover up the passwords and session details to send to the youtube server? How does the browser store and manage this?
I am familiar with the operation of protocols like sso and federated identity, but here I'm interested in writing a webpage/app capable of picking up this information from the browser.