forked from wangziqi/gongxue-base
fix: default PNVS secrets to sms scope
This commit is contained in:
@@ -51,7 +51,12 @@ function parseSecretRef(value: unknown): { scope: TenantSecretScope; key: string
|
||||
|
||||
function defaultSecretScope(provider: string): TenantSecretScope {
|
||||
const normalized = provider.toLowerCase().replace(/[_\s]/g, '-');
|
||||
if (normalized.includes('sms') || normalized === 'aliyun' || normalized === 'tencent') return 'sms';
|
||||
if (
|
||||
normalized.includes('sms') ||
|
||||
normalized === 'aliyun' ||
|
||||
normalized === 'aliyun-pnvs' ||
|
||||
normalized === 'tencent'
|
||||
) return 'sms';
|
||||
if (normalized.includes('pay') || normalized.includes('alipay')) return 'payment';
|
||||
return 'oauth';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user