[Feature] 一键登录功能目前游戏客户端都支持,是否考虑添加个一键登录功能开关
Checklist
- [X] I have already read docs/Tips.md, but my feature is not implemented.
- [X] My suggested feature was not mentioned by others, and it is not a duplicate feature.
Summary
目前国服的四个游戏实测均已支持启动参数一键登录。先获取AuthTicket,再将ticket作为启动参数来启动游戏即可自动登录。ticket目前不区分gamebiz,通用,使用一次后失效,失效时间未测试。 这样可以解决掉重启电脑掉登录问题。但无法解决风控导致game_token被重置引起的掉登录。
Solution or Design
1. 获取AuthTicket示例
POST: https://passport-api.mihoyo.com/account/ma-cn-verifier/app/createAuthTicketByGameBiz Header: Connection: keep-alive sec-ch-ua: "Chromium";v="102" x-rpc-client_type: 3 sec-ch-ua-platform: "Windows" x-rpc-game_biz: hyp_cn sec-ch-ua-mobile: ?0 User-Agent: HYPContainer/1.2.2.159 (windows 11) Accept: application/json, text/plain, / Content-Type: application/json x-rpc-hyp_web_source: bh3 x-rpc-app_id: ddxf5dufpuyo Origin: https://hyp-api.mihoyo.com Sec-Fetch-Site: same-site Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: https://hyp-api.mihoyo.com/ Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Body: { "game_biz": "bh3_cn", "stoken": "v2_xxxxxxxxxxxxxxxxxx.CAE=", "uid": xxxxxxxxxxxx, "mid": "xxxxxxxxx_mhy" } Response: { "retcode": 0, "message": "OK", "data": { "ticket": "gw1a6iiro8t5y1wepykt205fkkv6cuzk" } }
示例中head删去了部分device信息,但不影响使用,可直接使用。
2.启动CommandLine:
bh3.exe login_auth_ticket=gw1a6iiro8t5y1wepykt205fkkv6cuzk
启动后会自动登录对应账号,如果ticket无效则登录原本注册表中的账号
谢谢你的建议,以后可能会实现这个功能