Repository navigation
fix(mobile): pair with the desktop environment named by the QR code - #598
Merged
Merged
Conversation
A desktop QR encodes the full claim URL, but the app also required that URL to match the platform implied by the APK's own version channel. A dev build therefore rejected a production desktop with PA003 before sending anything, and the only workaround was repackaging the app per environment. Accept the claim URL whenever it is one of the first-party HTTPS platforms with the exact claim path, and keep refresh/revoke deriving from the URL now stored with each desktop's credentials, so one APK pairs with either environment and switching desktops cannot mix them. PA003 now means an untrusted address rather than a channel mismatch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
桌面二维码里本来就带完整的领取地址 claim_url,但手机端还额外要求它与 APK 自身的版本渠道一致(release 正式、其余测试)。于是开发版 APK 扫到正式环境桌面的二维码时,在发出任何请求之前就报 PA003,只能靠「按环境各打一次包」绕开——用户实际遇到的正是这个:桌面在正式环境,本地下载的开发版 APK 只认测试环境。
改动
验证
pm run typecheck\、
pm run lint\、
pm test\ 通过(917 项;\SessionList\ 首次在 Windows 冷跑出现一次既有 hook 抖动,重跑通过,与本次改动无关)。