From a150b1c04eaf94db823029300f970c54b5b8bb03 Mon Sep 17 00:00:00 2001 From: jaywu0128 Date: Mon, 8 Aug 2016 16:19:58 +0800 Subject: [PATCH] Update oauth.js --- lib/oauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oauth.js b/lib/oauth.js index 1d8bd0b..4efe5cb 100644 --- a/lib/oauth.js +++ b/lib/oauth.js @@ -368,7 +368,7 @@ OAuth.prototype._verifyToken = function (openid, accessToken, callback) { OAuth.prototype.getUserByCode = function (code, callback) { var that = this; this.getAccessToken(code, function (err, result) { - if (err) { + if (err&&err!='ok') { return callback(err); } that.getUser(result.data.openid, callback);