- Notifications
You must be signed in to change notification settings - Fork51
add third party github login for future updates in vscode-leetcode#34
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…d somehow solve the recaptcha problem
jdneo commentedDec 16, 2019
Will take a look at the PR before the end of this week. Thank you@yihong0618 |
jdneo left a comment
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.
Please correct me if I'm wrong.
If the user enables two-factor auth in GitHub, this method won't able to login, I'm I right?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
yihong0618 commentedDec 17, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
And I tonight I will add Linkedin login maybe, Facebook has a little problem, Google will not work |
jdneo commentedDec 18, 2019
Hmm, actually I failed to login using my GitHub account. Does your GitHub account enable the two-factor auth? |
yihong0618 commentedDec 18, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
jdneo commentedDec 18, 2019
Sure I'll try with LinkedIn later tonight... |
jdneo commentedDec 18, 2019
And I think you can disconnect and connect another Github account for test. |
jdneo commentedDec 18, 2019
Tried another GitHub account without 2-factor auth, and login successfully. So I think we can first hint to user that 2-factor auth is not supported yet. And spend some time to see if it is possible to enable it. |
jdneo left a comment
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.
Well Done!
lib/plugins/leetcode.js Outdated
_request.get({url: leetcodeUrl}, function(e, resp, body) { | ||
const redirectUri = resp.request.uri.href; | ||
if (redirectUri !== 'https://leetcode.com/') { | ||
return cb('GitHub login failed or GitHub did not link to leetcode'); |
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.
leetcode -> LeetCode
lib/plugins/leetcode.js Outdated
}); | ||
_request('https://www.linkedin.com', function(e, resp, body) { | ||
if ( resp.statusCode !== 200) { | ||
return cb('Get linkedin session failed'); |
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.
linkedin -> LinkedIn
lib/plugins/leetcode.js Outdated
} | ||
const authenticityToken = body.match(/input name="loginCsrfParam" value="(.*)" /); | ||
if (authenticityToken === null) { | ||
return cb('Get Linkedin token failed'); |
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.
lib/plugins/leetcode.js Outdated
_request.get({url: leetcodeUrl}, function(e, resp, body) { | ||
const redirectUri = resp.request.uri.href; | ||
if (redirectUri !== 'https://leetcode.com/') { | ||
return cb('Linkedin login failed or Linkedin did not link to leetcode'); |
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.
LeetCode
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.
Sorry for that, I will correct them~
Thank you very much for your help ~
OK, seems a little hard but I will try. |
jdneo commentedDec 18, 2019
Yes, no need to support facebook at this time. GitHub and LinkedIn are good enough! |
jdneo commentedDec 24, 2019
Thank you@yihong0618. Would you like me to publish a new release for this change? |
Yes. |
jdneo commentedDec 25, 2019
@yihong0618 Sure! Will the PR you mentioned be raised in this repo? |
Uh oh!
There was an error while loading.Please reload this page.
Add third party github login for future updates in vscode-leetcode and somehow solve the recaptcha problem.
Users only need to connect github(or already connected) can useleetcode user -g can login leetcode in leetcode-cli and future for vscode-leetcode(other third parties also can add except google... I will add it if necessary)
how to connect github