diff --git a/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js b/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js index ae9b7af18f92db92fd4a686ef8cfdc25780becd3..21c70e9c6c49a6aed98f0f5542a7c811e1a2da92 100644 --- a/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js +++ b/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js @@ -22,6 +22,8 @@ async function sendSmsCode ({ } = {}) { const requiredParams = [ 'name', + 'smsKey', + 'smsSecret', 'codeExpiresIn' ] const smsConfig = (this.config.service && this.config.service.sms) || {} diff --git a/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js b/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js index b64bef992ec384f7872940173f85e3be0bd6751a..33c17c00a23f3d6ad2c5f7abeb288ef807d8ae60 100644 --- a/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js +++ b/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js @@ -3,7 +3,7 @@ async function getPhoneNumber ({ access_token, openid } = {}) { - const requiredParams = [] + const requiredParams = ['apiKey', 'apiSecret'] const univerifyConfig = (this.config.service && this.config.service.univerify) || {} for (let i = 0; i < requiredParams.length; i++) { const key = requiredParams[i] diff --git a/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js b/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js index c28f3bd67b8d806fa9af246bed6f5a3b1d60ef75..476e23427b81752a94c19602ecb41dde16bc689b 100644 --- a/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js +++ b/uni_modules/uni-id-pages-x/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js @@ -4,7 +4,8 @@ function isMobileCodeSupported () { } function isUniverifySupport () { - return true + const config = this.config + return !!(config.service && config.service.univerify && config.service.univerify.apiKey) } function isWeixinSupported () {