From a97cafbe5d85726eae2048656a171a5eb5961822 Mon Sep 17 00:00:00 2001 From: reruin Date: Mon, 1 Jun 2020 15:24:22 +0800 Subject: [PATCH] simplify mount guide --- plugins/drive.gd.api.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/plugins/drive.gd.api.js b/plugins/drive.gd.api.js index ad596517..c5842998 100644 --- a/plugins/drive.gd.api.js +++ b/plugins/drive.gd.api.js @@ -168,18 +168,16 @@ const install = async (client_id, client_secret, redirect_uri) => { return `

挂载GoogleDrive

-

1. 访问此链接点击 [Enable the Drive API] 按钮,获取 credentials.json。如果你已有凭证请从第二步开开始。

- -

2. 上传json凭证。

-

3. 获取验证code

+

1. 访问此链接点击 [Enable the Drive API] 按钮,创建[Desktop app]类型的凭证,获取 Client ID / Client Secret。如果已有凭证请从第二步开开始。

+

2. 填写Client ID / Client Secret后,点击获取验证code,若出现[This app isn't verified],请展开Advanced,点击[Go to Quickstart (unsafe)]。

-
-
-
- +
+
+
+
@@ -320,7 +322,8 @@ module.exports = ({ request, cache, getConfig, querystring, base64, saveDrive, g if(!credentials){ //使用 client_id, client_secret, code , redirect_uri 快速挂载 if( req.body && req.body.act && req.body.act == 'quick_install'){ - let { client_id, client_secret, code , redirect_uri } = req.body + let { client_id, client_secret, code } = req.body + let redirect_uri = 'urn:ietf:wg:oauth:2.0:oob' if (client_id && client_secret && code && redirect_uri) { let credentials = await oauth2.authToken({client_id, client_secret, code , redirect_uri}) if (credentials.error) {