OLD | NEW |
---|---|
1 <h1>Identify User</h1> | 1 <h1>Identify User</h1> |
2 | 2 |
3 | 3 |
4 <p> | 4 <p> |
5 Web authentication protocols utilize HTTP features, | 5 Web authentication protocols utilize HTTP features, |
6 but packaged apps run inside the app container; | 6 but packaged apps run inside the app container; |
7 they don’t load over HTTP and can’t perform redirects or set cookies. | 7 they don’t load over HTTP and can’t perform redirects or set cookies. |
8 </p> | 8 </p> |
9 | 9 |
10 <p> | 10 <p> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 | 79 |
80 <p> | 80 <p> |
81 You need to copy the key in the installed | 81 You need to copy the key in the installed |
82 <code>manifest.json</code> to your source manifest. | 82 <code>manifest.json</code> to your source manifest. |
83 This ensures that the key isn't overridden anytime your reload your app | 83 This ensures that the key isn't overridden anytime your reload your app |
84 or share the app with other users. | 84 or share the app with other users. |
85 It's not the most graceful task, but here's how it goes: | 85 It's not the most graceful task, but here's how it goes: |
86 </p> | 86 </p> |
87 | 87 |
88 <ol> | 88 <ol> |
89 » <li>Go to your | 89 » <li>Go to your <a href="http://www.chromium.org/user-experience/user-dat a-directory">user data directory</a>. |
90 » » <a href="http://www.chromium.org/user-experience/user-data-direc tory">user data directory</a>. | 90 » Example on MacOs: |
91 » » Example on MacOs: <code>~/Library/Application\ Support/Google/Ch rome/Default/Extensions</code></li> | 91 » <code>~/Library/Application\ Support/Google/Chrome/Default/Extensions</c ode></li> |
92 » <li>List the installed apps and extensions and match your app ID on the apps and extensions management page | 92 » <li>List the installed apps and extensions and match your app ID on the apps and extensions management page to the same ID here.</li> |
93 » » to the same ID here.</li> | |
94 <li>Go to the installed app directory (this will be a version within the app ID). | 93 <li>Go to the installed app directory (this will be a version within the app ID). |
95 » » Open the installed <code>manifest.json</code> | 94 » Open the installed <code>manifest.json</code> |
96 » » (pico is a quick way to open the file).</li> | 95 » (pico is a quick way to open the file).</li> |
97 <li>Copy the "key" in the installed <code>manifest.json</code> and paste it into your app's source manifest file.</li> | 96 <li>Copy the "key" in the installed <code>manifest.json</code> and paste it into your app's source manifest file.</li> |
98 </ol> | 97 </ol> |
99 | 98 |
100 <h3 id="client_id">Get your client ID</h3> | 99 <h3 id="client_id">Get your client ID</h3> |
101 | 100 |
102 <p> | 101 <p> |
103 Setting up the client ID is currently not available externally | 102 You need to register your app |
104 via <a href="https://devconsole-canary.corp.google.com/apis/">Google APIs Consol e</a>. | 103 in the Google APIs Console |
105 So to setup the OAuth2 client ID, | 104 to get the client ID: |
106 email <a href="mailto:chrome-apps-auth-requests@google.com">chrome-apps-auth-req uest@google.com</a> | |
107 with your stable app ID and | |
108 we will reply appropriately with your OAuth2 client ID. | |
109 </p> | 105 </p> |
106 | |
107 <ol> | |
108 <li> Login to the <a href="https://code.google.com/apis/console/">Google APIs Console</a> | |
109 using the same Google account used to upload your app. </li> | |
Munjal (Google)
2013/01/04 19:48:05
used to upload your app to Chrome Web Store.
mkearney1
2013/01/07 22:02:58
Done.
| |
110 <li>Create a new project by expanding the drop-down menu in the top-left | |
111 corner and selecting the <strong>Create...</strong> menu item. </li> | |
112 <li> Once created and named, | |
113 go to the "Services" navigation menu item and | |
114 turn on any Google services your app needs. </li> | |
115 <li> Go to the "API Access" navigation menu item and click on the | |
116 <strong>Create an OAuth 2.0 client ID...</strong> blue button. </li> | |
117 <li> Enter the requested branding information, | |
118 select the <strong>Installed application</strong> type. </li> | |
119 <li> Select <strong>Chrome Application</strong> and | |
120 enter your application ID | |
121 (same ID displayed in the apps and extensions management page). </li> | |
Munjal (Google)
2013/01/04 19:48:05
We should add a note somewhere on this page that i
mkearney1
2013/01/07 22:02:58
Done.
| |
122 </ol> | |
110 | 123 |
111 <h3 id="update_manifest">Update your manifest</h3> | 124 <h3 id="update_manifest">Update your manifest</h3> |
112 | 125 |
113 <p> | 126 <p> |
114 You need to update your manifest to include | 127 You need to update your manifest to include |
115 the client ID and scopes. | 128 the client ID and scopes. |
116 Here's the sample "oauth2" for the | 129 Here's the sample "oauth2" for the |
117 <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/gdocs">g docs sample</a>: | 130 <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/gdocs">g docs sample</a>: |
118 </p> | 131 </p> |
119 | 132 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 </p> | 253 </p> |
241 | 254 |
242 <p> | 255 <p> |
243 The best practice we suggest is to use silent mode | 256 The best practice we suggest is to use silent mode |
244 when there is no user gesture involved and use interactive mode | 257 when there is no user gesture involved and use interactive mode |
245 if there is a user gesture (for example, the user clicked the Sign In button in your app). | 258 if there is a user gesture (for example, the user clicked the Sign In button in your app). |
246 Note that we do not enforce gesture requirement. | 259 Note that we do not enforce gesture requirement. |
247 </p> | 260 </p> |
248 | 261 |
249 <p class="backtotop"><a href="#top">Back to top</a></p> | 262 <p class="backtotop"><a href="#top">Back to top</a></p> |
OLD | NEW |