dsh-plugin-onenote 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/README.zh.md +8 -0
- package/client.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,6 +68,8 @@ one in about two minutes — no paid subscription is needed:
|
|
|
68
68
|
personal Microsoft accounts*. Choose a single-tenant option instead if every
|
|
69
69
|
user is in one tenant.
|
|
70
70
|
4. **Redirect URI**: leave empty — the device-code flow needs none.
|
|
71
|
+
*(Optional: if you configure a platform, choose **Mobile and desktop applications**
|
|
72
|
+
and tick `https://login.microsoftonline.com/common/oauth2/nativeclient`).*
|
|
71
73
|
5. **Register**, then copy **Application (client) ID**.
|
|
72
74
|
6. **Authentication → Advanced settings → Allow public client flows** = **Yes**,
|
|
73
75
|
then **Save**. Without this, sign-in fails with `unauthorized_client`.
|
|
@@ -78,6 +80,17 @@ one in about two minutes — no paid subscription is needed:
|
|
|
78
80
|
8. No client secret and no admin consent are needed for a personal account. A
|
|
79
81
|
work account may need an admin to grant consent once.
|
|
80
82
|
|
|
83
|
+
### Troubleshooting: "missing 'redirect_uri' input parameter"
|
|
84
|
+
|
|
85
|
+
If Microsoft fails with `invalid_request: The provided request must include a 'redirect_uri' input parameter`:
|
|
86
|
+
|
|
87
|
+
- **Cause**: At `microsoft.com/devicelogin`, selecting a Passkey / security key /
|
|
88
|
+
Windows Hello shortcut directly without typing your username causes Microsoft's
|
|
89
|
+
login service to misroute the device code flow into an interactive web flow.
|
|
90
|
+
- **Fix**: In the browser, **manually type your full Microsoft account email address**
|
|
91
|
+
first, then click **Next** before completing authentication. Alternatively,
|
|
92
|
+
open the verification link in an **InPrivate / Incognito** window.
|
|
93
|
+
|
|
81
94
|
Then point the plugin at your app by adding a patch layer of your own:
|
|
82
95
|
|
|
83
96
|
```yaml
|
package/README.zh.md
CHANGED
|
@@ -61,6 +61,7 @@ dsh plugin install dsh-plugin-onenote
|
|
|
61
61
|
3. **受支持的账户类型**:选择 *任何组织目录中的帐户和个人 Microsoft 帐户*。如果所有用户都在同一租户,
|
|
62
62
|
可以选单租户。
|
|
63
63
|
4. **重定向 URI**:留空——设备码流程不需要。
|
|
64
|
+
*(可选:如需添加平台,请选择 **移动和桌面应用程序** 并勾选 `https://login.microsoftonline.com/common/oauth2/nativeclient`)*。
|
|
64
65
|
5. 点击 **注册**,复制 **应用程序(客户端) ID**。
|
|
65
66
|
6. **身份验证 → 高级设置 → 允许公共客户端流** = **是**,然后 **保存**。不做这一步会报
|
|
66
67
|
`unauthorized_client`。
|
|
@@ -70,6 +71,13 @@ dsh plugin install dsh-plugin-onenote
|
|
|
70
71
|
- `User.Read` —— 显示登录账号名
|
|
71
72
|
8. 个人账户不需要客户端密码,也不需要管理员同意。工作账户可能需要管理员授权一次。
|
|
72
73
|
|
|
74
|
+
### 常见问题:报错 "missing 'redirect_uri' input parameter"
|
|
75
|
+
|
|
76
|
+
若在微软侧登录时提示 `invalid_request: The provided request must include a 'redirect_uri' input parameter`:
|
|
77
|
+
|
|
78
|
+
- **原因**:在访问 `microsoft.com/devicelogin` 输入设备码后,若直接点击 Passkey / 脸部指纹安全密钥等快捷方式登录,微软登录端可能发生跳转异常,将设备码流程误判定为需要回调地址的 Web 交互流程。
|
|
79
|
+
- **解决方法**:在浏览器登录界面中,**先手动完整输入微软账号邮箱**,点击“下一步”后再验证;或直接在**浏览器的无痕/隐私窗口(InPrivate / Incognito)**中打开链接并完成登录。
|
|
80
|
+
|
|
73
81
|
然后在自己的 patch 层里指向你的应用:
|
|
74
82
|
|
|
75
83
|
```yaml
|
package/client.js
CHANGED
|
@@ -40,6 +40,7 @@ window.__ModuleLoader__.load({
|
|
|
40
40
|
'pending.expired': 'That code expired. Start sign-in again for a fresh one.',
|
|
41
41
|
'pending.copy': 'Copy code',
|
|
42
42
|
'pending.copied': 'Copied',
|
|
43
|
+
'pending.tip': 'Note: If Microsoft shows "missing redirect_uri", do not click Passkey/security key directly. Enter your full Microsoft email address first, or use a private/incognito window.',
|
|
43
44
|
'signedIn.title': 'Connected',
|
|
44
45
|
'signedIn.as': 'Signed in as {name}',
|
|
45
46
|
'signedIn.account': 'Signed in',
|
|
@@ -84,6 +85,7 @@ window.__ModuleLoader__.load({
|
|
|
84
85
|
'pending.expired': '代码已过期,请重新开始登录。',
|
|
85
86
|
'pending.copy': '复制代码',
|
|
86
87
|
'pending.copied': '已复制',
|
|
88
|
+
'pending.tip': '提示:若微软报错“缺少 redirect_uri”,切勿直接点击 Passkey/安全密钥,请先手动输入完整微软邮箱账号,或使用浏览器无痕/隐私窗口重试。',
|
|
87
89
|
'signedIn.title': '已连接',
|
|
88
90
|
'signedIn.as': '已登录:{name}',
|
|
89
91
|
'signedIn.account': '已登录',
|
|
@@ -411,7 +413,8 @@ window.__ModuleLoader__.load({
|
|
|
411
413
|
}, tr('pending.open')),
|
|
412
414
|
h('button', { type: 'button', className: 'dsh-onenote-btn', onClick: copyCode }, copied ? tr('pending.copied') : tr('pending.copy')),
|
|
413
415
|
h('span', { className: 'dsh-onenote-caption' }, tr('pending.expires', { seconds: pending.expiresInSeconds }))
|
|
414
|
-
)
|
|
416
|
+
),
|
|
417
|
+
h('div', { className: 'dsh-onenote-warn' }, tr('pending.tip'))
|
|
415
418
|
))
|
|
416
419
|
}
|
|
417
420
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-onenote",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Read the Microsoft OneNote notebooks you allow, from DeepSeek Harness. Device-code sign-in and a per-notebook allow-list you control in Settings. · 让 DSH 读取你勾选的 OneNote 笔记本:设备码登录,笔记本白名单在设置页勾选。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|