- 根因:Cloudflare OAuth 的 scope 是点号分隔(account.read),冒号写法不被接受, 授权端点直接返回 error=invalid_scope。默认 scope 改为 account.read zone.read email_routing.write workers_scripts.write - scope 可在设置页自定义(settings.cf_oauth_scopes),需与 App 登记值逐字一致 - 新增 GET /api/oauth/cloudflare/preflight + 设置页「检测授权配置」按钮: 只读探测授权端点(不跟随跳转),区分 登录同意页 / 弹回回调 / Cloudflare /oauth/error, 并把 invalid_scope、invalid_request 翻译成可执行的处置建议 - 回调端点处理 error 参数:不再拿空 code 去兑换 token,改为跳回账号页并弹窗说明原因 (此前会落到 SPA 404 空壳页) - 账号页读取 ?oauth_error= 弹窗展示 Cloudflare 的原始描述 - docs/02 补 Cloudflare OAuth App 配置清单(Redirect URL / Client URI 域名校验 / Promote to public / 点号 scope);83 个测试全通过
36 lines
890 B
JSON
36 lines
890 B
JSON
{
|
|
"name": "wmailhub",
|
|
"version": "2.3.1",
|
|
"description": "WmailHub - 基于 Cloudflare Email Workers 的轻量邮件接收与转发平台(Console 直连 Email Worker)",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "bun run scripts/dev.ts",
|
|
"build": "vite build",
|
|
"test": "bun test",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@ant-design/icons": "^6.3.4",
|
|
"antd": "^6.6.5",
|
|
"hono": "^4.9.0",
|
|
"node-html-parser": "^9.0.4",
|
|
"postal-mime": "^2.4.1",
|
|
"react": "^19.2.0",
|
|
"react-dom": "^19.2.0",
|
|
"react-router-dom": "^7.9.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^19.2.0",
|
|
"@types/react-dom": "^19.2.0",
|
|
"@vitejs/plugin-react": "^6.1.1",
|
|
"bun-types": "^1.2.0",
|
|
"playwright-core": "^1.63.0",
|
|
"typescript": "^5.9.0",
|
|
"vite": "^8.3.1"
|
|
},
|
|
"engines": {
|
|
"bun": ">=1.2.0"
|
|
}
|
|
}
|