fix version 1

This commit is contained in:
2026-09-22 21:15:34 +08:00
parent 9f86366638
commit d63d7e8b3a
277 changed files with 9959 additions and 1514 deletions

View File

@@ -8,7 +8,6 @@
package register
import (
"bsm/full/module/base/passport/internal/config"
"bsm/full/module/base/passport/internal/impl"
"bsm/full/module/base/passport/internal/logic/common"
"bsm/full/module/base/passport/internal/models"
@@ -27,7 +26,7 @@ func Do(in *pb.RegisterRequest) (*pb.RegisterReply, error) {
var salt string
if in.Password != "" {
salt = utils.UUID()
hashedPassword, err := bcrypt.GenerateFromPassword([]byte(in.Password+salt), bcrypt.MinCost)
hashedPassword, err := bcrypt.GenerateFromPassword([]byte(in.Password+salt), bcrypt.DefaultCost)
if err != nil {
return nil, errcode.ErrInternal
}
@@ -81,7 +80,7 @@ func Do(in *pb.RegisterRequest) (*pb.RegisterReply, error) {
}
//save token to cache.
err = impl.RedisService.Client.Set(impl.RedisService.Ctx, config.Spec.Token.Prefix+pa.Identity, token, _vars.JwtExpire).Err()
err = impl.RedisService.Client.Set(impl.RedisService.Ctx, vars.TokenPrefix+pa.Identity, token, _vars.JwtExpire).Err()
if err != nil {
printer.Error("Set redis cache by key %v error:%v", vars.TokenPrefix+pa.Identity, err)
return nil, errcode.ErrInternal