Skip to content

Commit

Permalink
修复-微信小程序的一键登录 缺少state参数
Browse files Browse the repository at this point in the history
Signed-off-by: Evol郑天 <[email protected]>
  • Loading branch information
jpevol authored and gitee-org committed Dec 2, 2023
1 parent 86e3dba commit df437cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public AppAuthLoginRespVO weixinMiniAppLogin(AppAuthWeixinMiniAppLoginReqVO reqV

// 绑定社交用户
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);
Expand Down

0 comments on commit df437cf

Please sign in to comment.