Showing
2 changed files
with
5 additions
and
4 deletions
@@ -58,8 +58,9 @@ const wechat = { | @@ -58,8 +58,9 @@ const wechat = { | ||
58 | if (err) { | 58 | if (err) { |
59 | return next(err); | 59 | return next(err); |
60 | } | 60 | } |
61 | - let nickname = user.nickname; | ||
62 | - let openId = user.unionid || user.openid; | 61 | + console.log(user); |
62 | + let nickname = user.displayName || user._json.nickname; | ||
63 | + let openId = user.id || user._json.unionid; | ||
63 | 64 | ||
64 | doPassportCallback(openId, nickname, req, res); | 65 | doPassportCallback(openId, nickname, req, res); |
65 | })(req, res, next); | 66 | })(req, res, next); |
@@ -50,8 +50,8 @@ module.exports = { | @@ -50,8 +50,8 @@ module.exports = { | ||
50 | }, | 50 | }, |
51 | thirdLogin: { | 51 | thirdLogin: { |
52 | wechat: { | 52 | wechat: { |
53 | - appID: 'wx3ae21dcbb82ad672', | ||
54 | - appSecret: 'e78afb2321e6a19085767e1a0f0d52c1' | 53 | + appID: 'wx75e5a7c0c88e45c2', |
54 | + appSecret: 'ce21ae4a3f93852279175a167e54509b' | ||
55 | } | 55 | } |
56 | } | 56 | } |
57 | }; | 57 | }; |
-
Please register or login to post a comment