-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
add login with qq, wechat and weibo #3069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thanks for your PR, can you please address the code style nits and we'll be able to merge that?
@@ -33,7 +36,10 @@ let providers = { | |||
digits, | |||
janrainengage, | |||
janraincapture, | |||
vkontakte | |||
vkontakte, | |||
qq:qq, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pleas use the short hand like the others
function graphRequest(path) { | ||
return new Promise(function (resolve, reject) { | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank lines
}).on('error', function (e) { | ||
reject('Failed to validate this access token with qq.'); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank lines
|
||
function graphRequest(path) { | ||
return new Promise(function (resolve, reject) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank lines
}).on('error', function (e) { | ||
reject('Failed to validate this access token with weixin.'); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank lines
"access_token":access_token | ||
}); | ||
|
||
var options = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use const
} | ||
}; | ||
|
||
var req = https.request(options, function(res){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use const
var data = ''; | ||
res.on('data', function (chunk) { | ||
data += chunk; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
}); | ||
req.write(postData); | ||
req.end(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank line
module.exports = { | ||
validateAppId: validateAppId, | ||
validateAuthData: validateAuthData | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use short hands and add line break
@qiushi2012 updated the pull request - view changes |
Thanks! This all seems to be ok now! |
* add login with qq, wechat and weibo * modify the code style, etc
* add login with qq, wechat and weibo * modify the code style, etc
add login with qq, wechat and weibo