🐛 修复微信小程序的一键登录时,缺少 state 参数
This commit is contained in:
parent
47b77d7360
commit
319c73feaf
|
@ -23,4 +23,8 @@ 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;
|
||||
|
||||
}
|
||||
|
|
|
@ -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(), ""));
|
||||
SocialTypeEnum.WECHAT_MINI_APP.getType(), reqVO.getLoginCode(), reqVO.getState()));
|
||||
|
||||
// 创建 Token 令牌,记录登录日志
|
||||
return createTokenAfterLoginSuccess(user, user.getMobile(), LoginLogTypeEnum.LOGIN_SOCIAL, openid);
|
||||
|
|
Loading…
Reference in New Issue