Skip to content

feat(login): support password login for android protocol - #5

Merged
HarcicYang merged 1 commit into
HarcicYang:masterfrom
gotohitori0221:feat/android-password-login
Nov 27, 2026
Merged

HarcicYang merged 1 commit into
HarcicYang:masterfrom
gotohitori0221:feat/android-password-login

Conversation

@gotohitori0221

Copy link
Copy Markdown
Contributor

改动

  • LoginConfig 新增 login.password(允许 null,会归一为空串),schema 与文档同步更新
  • 配置了密码时登录走 client.login(password);sig.bin 里 d2 有效时仍然先尝试复用注册
  • protocol 为 android_phone / android_pad 且密码为空时,加载配置阶段直接报错:安卓协议不支持扫码登录,请填写 login.password
  • CLI 捕获 ValidationError 并打印,退出码 1

原因

之前没有密码配置项,安卓协议只能落到扫码登录,而安卓本身不支持扫码,导致无法登录。

验证

  • linux 不填密码正常走扫码
  • android_phone + password: null、android_pad + 空密码都会命中上述报错
  • 安卓填写密码后正常通过校验
  • python scripts/gen_schema.py 已重新生成 appconfig.schema.json

- Add a nullable login.password to LoginConfig and the JSON schema
- Pass the password to the client login when configured
- Fail fast on android protocols without a password because scan login is unsupported
- Document the new option in the configuration and login guides
@HarcicYang
HarcicYang merged commit 04e4584 into HarcicYang:master Nov 27, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants