title: Authenticating users via Google APIs OAuth2 to use Chrome extension
body: <p>I'm currently trying to make a google chrome extension that will 'like' or 'favorite' a youtube video if you upvote it on Reddit. Obviously, you need the user to be logged in and authenticate said user so you can like or favorite the video.</p>
  
  <p>My question is how exactly do I go about doing this? I've tried doing some research but I'm still completely lost on where the user authentication comes in or how the user signs in if not already. I'm assuming I need to use OAuth2 in order to like the video on youtube, but how do I implement that in my extension?</p>
  
  <p>So far, all I have are my content.js and manifest.json:</p>
  
  <pre><code>    {
        "name": "VideoUpLike",
        "version": "1.0.0",
        "description": "Likes the video on YouTube after upvoting a YouTube link on Reddit",
        "manifest_version": 2,
        "permissions": [
          "https://www.googleapis.com/*"
        ],
        "content_scripts": [
          {
            "matches": ["http://www.reddit.com/*", "https://www.reddit.com/*"],
            "js" : [ "contentscript.js"]
          }],
        "background": {
          "page": ["Auth.html"]
        }
      }
  </code></pre>
  
  <p>and my text content.js script to test the upvote button click:</p>
  
  <pre><code>    document.addEventListener('click', function(e) {
          if (e.target.matches('.arrow.upmod')) {
              alert("Oh hi there");
              }
      });
  </code></pre>