chore(auth): 临时硬关闭微信聚合登录(aggregate=false)\n\n用户反馈:先暂时不做微信登录了。\n\n双重保险:\n1) 构建期开关:nuxt.config.ts runtimeConfig.public.oauth.aggregate 由\n 原来的 !!process.env.AGGREGATE_OAUTH_APP_ID 改为硬编码 false。\n 影响范围:\n - 登录页 OAuthButtons.vue 中的 v-if 分支不再渲染绿色微信按钮\n - app/pages/account/index.vue 中 hasOAuthProviders aggregate=false → 个人页\n 第三方绑定分区即使其他 provider 都没配也会显示其它 provider,\n 但微信卡片 OAuthBindingCard.vue 因 config.public.oauth.aggregate=false\n 被 v-if 直接拿掉不渲染\n - app/utils/oauth.ts getProviderDisplayName 中 aggregate→微信 映射还保留,\n 恢复时无需再改\n2) 运行期强制关:server/utils/oauth-strategies.ts loadAggregateSettings\n 返回值 aggregateOAuthEnabled 硬编码 false(即使 process.env.AGGREGATE_OAUTH_APP_ID\n 和 system_settings 表都配齐也不启用)。并加 _hardDisabledReason 字段给后续日志\n 留解释,避免以后排查为何 ENV/DB 都有值却 500 说未配置。\n\n后续恢复步骤(两处同时改回即可):\n A. nuxt.config.ts public.oauth.aggregate 改回\n aggregate: !!process.env.AGGREGATE_OAUTH_APP_ID\n B. server/utils/oauth-strategies.ts loadAggregateSettings 返回对象\n aggregateOAuthEnabled 改回原本逻辑:\n enabled && !!(appId && appKey && endpoint)\n 并删除 _hardDisabledReason 字段即可。\n\n注意:Gitea Repository Secrets 中的 6 条 AGGREGATE_OAUTH / OAUTH_* 没有删除,\n保留在仓库里,下次恢复不用重新输入一遍。
This commit is contained in:
@@ -300,13 +300,15 @@ async function loadAggregateSettings() {
|
||||
const endpoint = ((base?.aggregateOAuthEndpoint as string) || envEndpoint || '') as string
|
||||
|
||||
const result: any = {
|
||||
aggregateOAuthEnabled: enabled && !!(appId && appKey && endpoint),
|
||||
aggregateOAuthEnabled: false,
|
||||
aggregateOAuthAppId: appId,
|
||||
aggregateOAuthAppKey: appKey,
|
||||
aggregateOAuthLoginType: loginType,
|
||||
aggregateOAuthEndpoint: endpoint,
|
||||
_dbHasConfig: dbHasConfig,
|
||||
_hasEnvConfig: hasEnvConfig
|
||||
_hasEnvConfig: hasEnvConfig,
|
||||
_hardDisabledReason:
|
||||
'[hard-disabled] nuxt.config.ts public.oauth.aggregate 已硬编码 false,暂时关闭微信聚合登录;恢复时同时改 nuxt.config.ts 改回 !!process.env.AGGREGATE_OAUTH_APP_ID 以及删除此处的强制 false'
|
||||
}
|
||||
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user