Use OAuth 2.0 to obtain pinning service access token
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, react
- 领域
- api, authentication, frontend
调研方向
首先检查 WebUI 中现有的 pinning-service 配置和 Pinata 集成;该 issue 未指定具体的文件或测试。定义 client ID、callback page、scopes、provider authorization endpoint 和 token endpoint,以及 settings page entry point。完成标准是:一个有文档说明的 Pinata OAuth 流程能够返回 WebUI 并配置 provider,同时记录 provider 侧的注册要求。
由索引模型根据 Issue 内容生成。
描述
Current situation
At the moment, configuring a pinning service requires a few manual steps:
- Accessing the pinning provider (e.g. Pinata)
- Creating an access token on the API Key management UI of the provider
- Figuring out the desired scope of actions the key should allow
- Pasting the access token on the client (IPFS WebUI settings page)
While the experience is already quite simple for the current IPFS audience, it could be improved for lazy and/or less technical users, in line with the purpose of IPFS WebUI.
Possible improvement: OAuth 2.0 authorization flow
User experience
With Pinata for instance, the UX would be:
- From WebUI, I click on Pinata icon. I'm directed to Pinata's consent page, showing IPFS WebUI logo and name, as well as the desired scope (around the lines of "Manage pinning").
- I click on "Authorize".
- Et voilà. I'm back to my WebUI instance and the provider is configured.
Technical changes
- Decide on (and document) a client_id constant, say
ipfs_webui. - Implement (and document) a callback page that receives the OAuth 2.0 response after the user has granted access, and does the token fetching logic. There are libraries that help greatly with that bit.
- Define (and document) one or several scopes based on consent granularity. I'm not familiar with the feature enough yet, but one scope might be enough at first, e.g.
pinning. - Add a clickable button to send the user to the provider's authorization endpoint, with the proper client_id, redirect_uri and scope (the same libraries can generate that link too).
- Currently that would be only for Pinata but the process would be identical for any provider, changing only the endpoints, or even only the base hostname thanks to RFC 8414 and/or OIDC Discovery.
- Possibly also an input box for configuring custom providers.
For reference, on the provider side:
- Expose OAuth 2.0 endpoints (namely the authorization endpoint and the token endpoint).
- Make the token endpoint automatically generate an API key with the right permissions (taken from the scope).
- Register IPFS WebUI as a public client, with logo and name, and the documented client_id and callback URI.
Additional notes
A similar approach would exist for other clients such as Desktop UI, CLI etc., with different callback URIs (native deep link etc.).
- 主要语言
- JavaScript
- 星标
- 1.6k
- 派生
- 539
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ipfs/ipfs-webui 的其他 Issue
-
need/triage
难度 5/5 一周以上 新手友好度 25/100
ipfs/ipfs-webui#2454 ·
-
need/triage
难度 1/5 1 小时以内 新手友好度 45/100
ipfs/ipfs-webui#2391 · 3 条评论 ·
-
effort/days exp/intermediate help wanted P2 status/blocked
难度 5/5 一周以上 新手友好度 25/100
ipfs/ipfs-webui#2380 · 6 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 28/100
ipfs/ipfs-webui#2359 · 3 条评论 · 1 个 reaction ·
-
feat: create shortcut component that can be used on any page可能已有人在做 @george-hub331 于 588 天前认领。 未关闭P3
难度 4/5 3-5 天 新手友好度 35/100
ipfs/ipfs-webui#2350 · 2 条评论 ·
相似的 Issue
-
QA
难度 2/5 1-3 小时 新手友好度 68/100
CSIS-iLab/more-red-ink#164 ·
维护者通常 1 天内回复
-
area:filesystem bug need-triage
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
comp/dashboard P2 type/bug
难度 2/5 1-3 小时 新手友好度 65/100
NousResearch/hermes-agent#156404 ·
维护者通常 1 天内回复
-
Band: compact mode never draws on Claude Code 2.1.292 (level Button has a Text child)可能已有人在做 @Bunty9 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
DietrichGebert/ponytail#1437 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
huggingface/transformers.js#1945 ·
维护者通常 1 天内回复