Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

记录session数据,保持登录状态(memory-card) #28

Closed
2 tasks done
su-chang opened this issue Jan 6, 2022 · 3 comments
Closed
2 tasks done

记录session数据,保持登录状态(memory-card) #28

su-chang opened this issue Jan 6, 2022 · 3 comments
Assignees

Comments

@su-chang
Copy link
Member

su-chang commented Jan 6, 2022

为了记录当前账号的登录状态,避免反复扫码从而导致的一些麻烦(繁琐操作,封号风险等)

  • 将当前登录进行采用 memory-card 方式进行缓存 (memory-card支持上传AWS S3的操作)
  • 不同环境下使用 memory-card 中记录的内容实现自动登陆
@su-chang su-chang mentioned this issue Jan 6, 2022
42 tasks
@wedreamer wedreamer self-assigned this Jan 7, 2022
@wedreamer
Copy link

wedreamer commented Jan 7, 2022

  • 激进的时间预估 2022-1-12
  • 保守的时间预估 2022-1-15

@bung87
Copy link
Contributor

bung87 commented Jan 12, 2022

这个在本身已经有,主要工作在xiaoju-bot 那边patch了memory-card

diff --git a/node_modules/memory-card/dist/src/storage/backend-config.js b/node_modules/memory-card/dist/src/storage/backend-config.js
index 2bcbeb8..d725ce8 100644
--- a/node_modules/memory-card/dist/src/storage/backend-config.js
+++ b/node_modules/memory-card/dist/src/storage/backend-config.js
@@ -6,7 +6,7 @@ const nop_1 = require("./nop");
 exports.BACKEND_FACTORY_DICT = {
     file: () => file_1.StorageFile,
     nop: () => nop_1.StorageNop,
-    obs: () => require('./obs'),
-    s3: () => require('./s3'),
+    obs: () => require('./obs').StorageObs,
+    s3: () => require('./s3').StorageS3,
 };
 //# sourceMappingURL=backend-config.js.map

@wedreamer
Copy link

相关参考
当前是基于内存的 session 的保存
基于文件的 session 存储

@su-chang su-chang closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants