修复-微信小程序的一键登录 缺少state参数

Signed-off-by: Evol郑天 <jpevol@163.com>
This commit is contained in:
Evol郑天 2023-12-02 02:14:26 +00:00 committed by Gitee
parent 86e3dba268
commit df437cfc38
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 1 deletions

View File

@ -23,4 +23,7 @@ public class AppAuthWeixinMiniAppLoginReqVO {
@NotEmpty(message = "登录 code 不能为空")
private String loginCode;
@Schema(description = "state", requiredMode = Schema.RequiredMode.REQUIRED, example = "9b2ffbc1-7425-4155-9894-9d5c08541d62")
@NotEmpty(message = "state 不能为空")
private String state;
}

View File

@ -131,7 +131,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
// 绑定社交用户
String openid = socialUserApi.bindSocialUser(new SocialUserBindReqDTO(user.getId(), getUserType().getValue(),
SocialTypeEnum.WECHAT_MINI_APP.getType(), reqVO.getLoginCode(), "")).getCheckedData();
SocialTypeEnum.WECHAT_MINI_APP.getType(), reqVO.getLoginCode(), reqVO.getState())).getCheckedData();
// 创建 Token 令牌记录登录日志
return createTokenAfterLoginSuccess(user, user.getMobile(), LoginLogTypeEnum.LOGIN_SOCIAL, openid);