Index: chrome/common/extensions/docs/tut_oauth.html |
=================================================================== |
--- chrome/common/extensions/docs/tut_oauth.html (revision 132824) |
+++ chrome/common/extensions/docs/tut_oauth.html (working copy) |
@@ -132,6 +132,7 @@ |
<ul> |
<li><a href="a11y.html">Accessibility</a></li> |
<li><a href="background_pages.html">Background Pages</a></li> |
+ <li><a href="transient_background_pages.html">Event Pages</a></li> |
<li><a href="content_scripts.html">Content Scripts</a></li> |
<li><a href="xhr.html">Cross-Origin XHR</a></li> |
<li><a href="i18n.html">Internationalization</a></li> |
@@ -286,6 +287,21 @@ |
'app_name': 'My Google Docs Extension' |
}); |
</pre> |
+<p> |
+To use the OAuth library, |
+you must declare the "tabs" permision in the |
+<a href="http://code.google.com/chrome/extensions/manifest.html">extension manifest</a>. |
+You must also declare the sites you are using |
+including the request URL, the authorize URL, access URL, |
+and, if necessary, the scope URL. |
+For example: |
+</p> |
+<pre>"permissions": [ "tabs", "https://docs.google.com/feeds/*", |
+ "https://www.google.com/accounts/OAuthGetRequestToken", |
+ "https://www.google.com/accounts/OAuthAuthorizeToken", |
+ "https://www.google.com/accounts/OAuthGetAccessToken" |
+] |
+</pre> |
<h3 id="request-token">Fetching and authorizing a request token</h3> |
<p> |
Once you have your background page set up, call the <code>authorize()</code> function to begin the OAuth dance and redirect the user to the OAuth provider. The client library abstracts most of this process, so all you need to do is pass a callback to the <code>authorize()</code> function, and a new tab will open and redirect the user. |