Skip to content

Commit

Permalink
feat: 增加微信登录功能
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyw committed May 27, 2024
1 parent 71307dc commit ac13501
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public Result<WxAuthResp> wxAuth(WxAuthReq req) throws WxErrorException {
WxAuthResp authResp = new WxAuthResp();
if (req.getLoginAuthType().equals(LoginAuthTypeEnum.PC.getCode())) {
// 网页应用
WxOAuth2Service wxOAuth2Service = new WxOpenOAuth2ServiceImpl(loginConfig.getWxPcLoginAppId(), loginConfig.getWxPcLoginAppSecret(), null);
WxOAuth2Service wxOAuth2Service = new WxOpenOAuth2ServiceImpl(loginConfig.getWxPcLoginAppId(), loginConfig.getWxPcLoginAppSecret(), new WxOpenInMemoryConfigStorage());
WxOAuth2AccessToken accessToken = wxOAuth2Service.getAccessToken(req.getCode());
authResp.setAuthInfo(getAuthInfo(wxOAuth2Service, accessToken));
} else if (req.getLoginAuthType().equals(LoginAuthTypeEnum.MP.getCode())) {
Expand Down

0 comments on commit ac13501

Please sign in to comment.