feat(auth): 审核账号旁路支持多个标识——Apple 用邮箱、微信用手机号并存(dev-board#347) - #692
Merged
Conversation
微信小程序审核要一个能登进去的测试账号,而小程序只有短信验证码一条登录路; Apple 那边同期在审,用的是邮箱标识。原来 auth.review-account.identity 只收 一个值,两家撞档期就得二选一,而临时改成另一家意味着前一家的审核员会在毫无 预兆的情况下登不进去。 改成逗号分隔的列表,共用同一个 6 位码。语义与红线一律不变:任一配置项为空即 全关、码非 6 位数字仍拒绝启动、只开在免密登录那条路上、未列出的标识一律走原路。 sendSigninCode 对审核账号短路不发短信这条也不变——所以列表里放测试号不会给 真人发短信。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
为什么
微信小程序 0.30.0 提审的「测试账号」栏要一个能登进去的账号,而小程序只有手机号短信验证码一条登录路——审核员收不到我们的短信。已有的审核账号旁路(
ReviewAccountGate)正好在这条链路上(SmsAuthService.sendSigninCode/verifySigninCode),但auth.review-account.identity只收一个值,而它此刻正被 Apple 审核占用(邮箱标识,两个 App 在审)。两家撞档期就得二选一,临时改成另一家等于让前一家的审核员毫无预兆地登不进去。改了什么
identity从单值改成逗号分隔的列表(Set<String>,保序去重),多个标识共用同一个 6 位码。语义与红线一个字没动:任一配置项为空即全关、码非 6 位数字仍然拒绝启动、只开在免密登录那条路上、未列出的标识一律走原路。
sendSigninCode对审核账号短路不发短信这条也不变——所以列表里放测试号不会给真人发短信。自验证
ReviewAccountGateTest/SmsAuthServiceTest/MailAuthServiceTest共 30 个用例全绿(新增 2 个:多标识并存、空项丢弃)。部署说明
本地
mvn package产出 989M,而服务器在跑的 jar 是 405M——构建口径不一致,不要直接覆盖。 差异来自 opencv 三平台原生库与 driver-bundle(本地全量打进来了)。本次上线采用最小侵入方式:只把BOOT-INF/classes/com/checkba/config/ReviewAccountGate.class打进服务器现有 jar(公开方法签名未变,与已在 jar 里的调用方二进制兼容),其余字节不动。下次整包部署时该改动随 master 一起进去。🤖 Generated with Claude Code