Chrome extension with OAuth2
<p>I am trying to create a Chrome Extension which would save some data to the user's Google Drive. I figured <code>OAuth</code> would be the best way to go about it. So I do the following in <code>manifest.json</code>:</p>

<pre><code>"oauth2": {
    "client_id": "&lt;my_client_id&gt;",
    "scopes": ["https://www.googleapis.com/auth/drive"]
}
</code></pre>

<p>After that, I want to use the Google API for authentication in my <code>background.js</code> using <code>gapi.auth.authorize</code> etc. However even if I include <code>https://apis.google.com/js/client.js</code> in background scripts of manifest, it still can not find it. What am I doing wrong? Is there a better way to use OAuth?</p>