Pixiv-Shaft icon indicating copy to clipboard operation
Pixiv-Shaft copied to clipboard

能否通过导入Cookie实现登录?

Open uian2000 opened this issue 3 years ago • 3 comments

Acknowledgements / 确认事项

  • [X] I have updated to the latest version of the app / 已经更新到最新版
  • [X] I have tried the FAQ / 试过FAQ了. FAQ
  • [X] I have searched the existing issues and this is new ticket NOT a duplicate or related to another issue / 搜索过其他issue,确实不是重复问题
  • [X] I will fill out the title and the information in this template / 填好标题和内容

What feature should be added? / 需要加上什么功能

直接登录受到网络、系统等各种限制,是否能够通过导入已经登录过的浏览器cookie来实现登录呢?

观察到初始页面右上角三个点点开,有一个[从剪切板导入]的功能,尝试手动填写了token字段,要么提示没有数据,要么直接闪退,不知道是不是打开(填写)的方式不正确?或者这个功能不是用来完成用户登录信息导入的?

Official support / 官方支持情况

  • [ ] Is this feature supported by the official pixiv app? / 官方App是否支持

Is this feature supported by any other third-party pixiv app? / 第三方App是否支持

没有看到其他第三方App支持该功能。

Any other information can be help? / 其它信息

No response

uian2000 avatar Jan 13 '23 10:01 uian2000

技术上做不到,你可以使用手机浏览器先登录pixiv,App登录时跳转浏览器授权,就不需要再登录了 这个导入是从App设置-账号管理这里复制当前已登录账户信息用的

sunbeams001 avatar Feb 01 '23 04:02 sunbeams001

技术上应该可以。既然可以跳转浏览器登录,那样shaft理应可以使用webview尝试登录,并在webview的cookie写入相应cookie。只要session ID一样,对方伺服器不会每次都烦你。

那么就用加了cookie的webview模仿用户转到授权页面再取得权限即可

SodaWithoutSparkles avatar Feb 25 '23 17:02 SodaWithoutSparkles

观察源码,粘贴板导入需要 3 个 token,但是 cookie 里只有 1 个,所以 webview 转授权是要提到另两个 token 是吧 期待🤓

uian2000 avatar Feb 26 '23 01:02 uian2000