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);