Switch protocol dashboard to OAuth 2.0 write scope + image mirrors#14052
Switch protocol dashboard to OAuth 2.0 write scope + image mirrors#14052raymondjacobson merged 5 commits intomainfrom
Conversation
…dd image mirror support Replace the deprecated write_once OAuth scope with standard write scope for the Connect Audius Profile flow. The old SDK APIs (oauth.init, getCsrfToken, activePopupWindow, OAUTH_URL) no longer exist — rewrite the hook to construct the OAuth URL manually with PKCE, sign wallet signatures with ethers instead of audiusLibs, and exchange auth codes for tokens after the popup completes. Also add mirror-based image loading with 3-second per-URL timeout fallback for profile pictures and trending artwork, replacing raw <img> tags that would stall indefinitely on unresponsive content nodes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 27814482 | Triggered | Generic High Entropy Secret | 1d340d6 | packages/protocol-dashboard/src/services/Audius/sdk.ts | View secret |
| 27814482 | Triggered | Generic High Entropy Secret | 1d340d6 | packages/protocol-dashboard/src/hooks/useConnectAudiusProfile.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14052.audius.workers.dev Unique preview for this PR (deployed from this branch). |
- Fix walletProvider not being passed through component chain - Use EIP-1193 personal_sign instead of ethers BrowserProvider - Add esbuild plugin to resolve ethers v6 for @Web3Modal (fixes dep optimization crash) - Inline badgeTiers to avoid circular dependency from @audius/common/store - Remove debug logging Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The protocol dashboard now uses standard write scope with PKCE, so write_once is dead code. Remove it from scope validation, collapsing, and the authorize flow. Rename WriteOnceTx/WriteOnceParams to DashboardWalletTx/DashboardWalletParams and clean up type casts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
write_oncescope with standardwritescope for the Connect Audius Profile flow. RewritesuseConnectAudiusProfilehook to construct OAuth URL manually with PKCE, sign wallet signatures with ethers (instead ofaudiusLibs.web3Manager), and exchange auth codes for tokens after the popup completes. Removes all references to old SDK OAuth APIs (oauth.init,getCsrfToken,activePopupWindow,OAUTH_URL).writescope to supporttx=connect_dashboard_wallet/tx=disconnect_dashboard_walletparams, reusing existinghandleAuthorizeConnectDashboardWallet/handleAuthorizeDisconnectDashboardWallethandlers.MirrorImagecomponent with 3-second per-URL timeout fallback for profile pictures and trending artwork. Replaces raw<img>tags andbackgroundImageinline styles that would stall on unresponsive content nodes.Test plan
npm run verifypasses in protocol-dashboard🤖 Generated with Claude Code