diff --git a/config/config.yaml b/config/config.yaml index 29bc4416c..d39c62b3c 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -464,13 +464,13 @@ demo: verificationCodeTemplateCode: SMS_226810164 superCode: 666666 # second - codeTTL: 60 + codeTTL: 300 mail: title: "openIM" senderMail: "765567899@qq.com" senderAuthorizationCode: "gxyausfoevlzbfag" smtpAddr: "smtp.qq.com" - smtpPort: + smtpPort: 25 diff --git a/internal/demo/register/verify.go b/internal/demo/register/verify.go index b362fd340..01fafbb92 100644 --- a/internal/demo/register/verify.go +++ b/internal/demo/register/verify.go @@ -45,9 +45,16 @@ func Verify(c *gin.Context) { log.NewInfo("0", " params.VerificationCode != config.Config.Demo.SuperCode", params.VerificationCode, config.Config.Demo) log.NewInfo(params.OperationID, "begin get form redis", account) if params.UsedFor == 0 { - params.UsedFor = 1 + params.UsedFor = constant.VerificationCodeForRegister } - accountKey := account + "_" + constant.VerificationCodeForRegisterSuffix + var accountKey string + switch params.UsedFor { + case constant.VerificationCodeForRegister: + accountKey = account + "_" + constant.VerificationCodeForRegisterSuffix + case constant.VerificationCodeForReset: + accountKey = account + "_" + constant.VerificationCodeForResetSuffix + } + code, err := db.DB.GetAccountCode(accountKey) log.NewInfo(params.OperationID, "redis phone number and verificating Code", accountKey, code, params) if err != nil { diff --git a/script/sdk_svr_start.sh b/script/sdk_svr_start.sh index 2ba1295cd..e9604e5ea 100644 --- a/script/sdk_svr_start.sh +++ b/script/sdk_svr_start.sh @@ -6,7 +6,6 @@ source ./function.sh list1=$(cat $config_path | grep openImApiPort | awk -F '[:]' '{print $NF}') list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}') list3=$(cat $config_path | grep openImSdkWsPort | awk -F '[:]' '{print $NF}') -list4=$(cat $config_path | grep openImCmsApiPort | awk - F '[:]' '{print $NF}') list_to_string $list1 api_ports=($ports_array) list_to_string $list2 @@ -14,7 +13,6 @@ ws_ports=($ports_array) list_to_string $list3 sdk_ws_ports=($ports_array) list_to_string $list4 -cms_api_ports=($ports_array) diff --git a/script/start_rpc_service.sh b/script/start_rpc_service.sh index bbd7f3c5a..bc5f41e3d 100644 --- a/script/start_rpc_service.sh +++ b/script/start_rpc_service.sh @@ -29,7 +29,7 @@ service_port_name=( openImUserPort openImFriendPort openImGroupPort - + openImAuthPort openImAdminCmsPort openImMessageCmsPort openImStatisticsPort