I think for almost all cases, there are simpler solutions:
* Use secure cookies (set the secure bit so these cookies are only sent over HTTPS) for authenticating on your HTTPS site
* Use a separate domain for embeds ("youtube-widgets.com" instead of "youtube.com" on third-party sites)