feat(auth): Google 登录支持多客户端 audience 校验

- GoogleAuthProperties 的 clientId 改为 clientIds 列表
- GoogleIdTokenVerifier 命中任一 clientId 即通过,兼容 iOS 与 Android 不同的 aud
- app-api 注入三个客户端 id,生产可用 GOOGLE_CLIENT_IDS 覆盖
This commit is contained in:
jianghaifeng committed 2026-11-13 12:30:55 +08:00
1 parent a706621786
commit 32cac38a0e
3 files changed
+21 -7

No files matched your search

@@ -65,6 +65,11 @@ fruitshorts:
# 仅作 sys_config 缺失/非法时的兜底;运行时优先读取后台「系统配置」
register-max-per-ip-per-day: ${REGISTER_MAX_PER_IP_PER_DAY:5}
register-max-per-device-per-day: ${REGISTER_MAX_PER_DEVICE_PER_DAY:3}
google:
# Google 登录允许的客户端 id(逗号分隔)。idToken 的 aud 随平台不同:
# iOS 为 iOS 客户端 id,Android 为 serverClientId 对应的 Web 客户端 id。
# 客户端 id 属公开信息,不是密钥;生产可用 GOOGLE_CLIENT_IDS 覆盖。
client-ids: ${GOOGLE_CLIENT_IDS:11115008580-51gv4sj2c78rud6n127g3shu4d2n96un.apps.googleusercontent.com,11115008580-dbqe47fhp5560nhrocrppiq7hcnlvl1s.apps.googleusercontent.com,11115008580-1v5pt5mfgbbuba74ebia6hngj618ne3a.apps.googleusercontent.com}
interaction:
# MACHINE_FIRST:机审通过即发布,命中 REVIEW 级敏感词才转人工
# PRE_REVIEW :全部先审后发(生产建议)