Spaces:
Running
Running
setup: clarify X OAuth steps — permissions + regenerate keys warning
Browse files- health-server.js +6 -14
health-server.js
CHANGED
|
@@ -288,24 +288,16 @@ function getOAuthPlatformDetails(publicUrl) {
|
|
| 288 |
body: 'Go to <a href="https://developer.twitter.com" target="_blank" rel="noopener">developer.twitter.com</a>. Apply for a developer account if needed. Create a new project + app.',
|
| 289 |
},
|
| 290 |
{
|
| 291 |
-
title: "
|
| 292 |
-
body: "On your app page → <strong>User authentication settings → Set up</strong>.
|
| 293 |
},
|
| 294 |
{
|
| 295 |
-
title: "
|
| 296 |
-
body: "<strong>
|
| 297 |
},
|
| 298 |
{
|
| 299 |
-
title: "Add
|
| 300 |
-
body: "
|
| 301 |
-
},
|
| 302 |
-
{
|
| 303 |
-
title: "Copy Consumer Key and Consumer Secret",
|
| 304 |
-
body: "Go to your app → <strong>Keys & Tokens</strong> tab → <strong>OAuth 1.0 Keys</strong> section.<br><br><strong>X_API_KEY</strong> = Consumer Key (click Show)<br><strong>X_API_SECRET</strong> = Consumer Secret — click <strong>Regenerate</strong> to reveal both together (the secret is only shown in the Regenerate popup).<br><br>⚠️ Do <em>not</em> use Bearer Token, Access Token, or OAuth 2.0 Client ID/Secret.",
|
| 305 |
-
},
|
| 306 |
-
{
|
| 307 |
-
title: "Add to Space secrets",
|
| 308 |
-
body: "Add both env vars below to your HF Space settings → Variables & Secrets, then restart the Space.",
|
| 309 |
},
|
| 310 |
],
|
| 311 |
},
|
|
|
|
| 288 |
body: 'Go to <a href="https://developer.twitter.com" target="_blank" rel="noopener">developer.twitter.com</a>. Apply for a developer account if needed. Create a new project + app.',
|
| 289 |
},
|
| 290 |
{
|
| 291 |
+
title: "Configure User Authentication Settings",
|
| 292 |
+
body: "On your app page → <strong>User authentication settings → Set up</strong>. Set ALL THREE of these, then click Save:<br><br><strong>1. App permissions:</strong> <strong>Read and write</strong> (default is Read-only — must change this)<br><strong>2. Type of App:</strong> <strong>Native App</strong> (Public client) — ⚠️ NOT Web App, Web App causes error code 32<br><strong>3. Callback URI:</strong> paste the Callback URL shown below. Website URL = your HF Space URL.<br><br>Save when done.",
|
| 293 |
},
|
| 294 |
{
|
| 295 |
+
title: "Regenerate Consumer Keys (required after saving settings)",
|
| 296 |
+
body: "Go to <strong>Keys & Tokens</strong> tab → <strong>OAuth 1.0 Keys</strong> section → click <strong>Regenerate</strong> next to Consumer Key.<br><br><strong>⚠️ You must regenerate after changing User Auth Settings</strong> — existing keys don't pick up new permissions.<br><br>The Regenerate popup shows BOTH values together — copy them immediately:<br>• <strong>API Key</strong> = your <strong>X_API_KEY</strong><br>• <strong>API Key Secret</strong> = your <strong>X_API_SECRET</strong><br><br>⚠️ Do NOT use Bearer Token, Access Token/Secret, or OAuth 2.0 Client ID/Secret.",
|
| 297 |
},
|
| 298 |
{
|
| 299 |
+
title: "Add to Space secrets and restart",
|
| 300 |
+
body: "Add <strong>X_API_KEY</strong> and <strong>X_API_SECRET</strong> to HF Space → Settings → Variables & Secrets. Then <strong>Restart the Space</strong> to load the new values.",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
},
|
| 302 |
],
|
| 303 |
},
|