Failed to log in with a leetcode.com account
See original GitHub issue🐛 Bug Report
I can’t log into my leetcode.com account via vscode plugin, but I can log in with the same email & password in the browser. In contrast, my leetcode-cn.com account seems to work fine with this vscode plugin.
To Reproduce
None
Expected behavior
Log into my leetcode.com account.
Extension Output
login: Active Name Version Desc
----------------------------------------------------------------------------------------------------
✔ solution.discuss 2019.02.03 Plugin to fetch most voted solution in discussions.
✔ company 2017.12.18 Plugin to query by company for free user.
✔ cache default Plugin to provide local cache.
✔ retry default Plugin to retry last failed request if autologin.enable is on.
✘ leetcode.cn 2018.11.25 Plugin to talk with leetcode-cn APIs.
✔ leetcode default Plugin to talk with leetcode APIs.
[ERROR] You are not login yet?
login: pass: - Signing in leetcode.com
[ERROR] invalid password?
Your Environment
- os: Windows 10 Family Edition x64 (#18362)
- extension settings: default
- nodejs version: 12.4.0
- vscode version: 1.40.1
- extension version: 0.15.7
Issue Analytics
- State:
- Created 4 years ago
- Reactions:49
- Comments:211 (47 by maintainers)
Top Results From Across the Web
Report a login problem: "reCAPTCHA failed to load" - LeetCode
Report a login problem: "reCAPTCHA failed to load" · Browser CH or FF · Log off Leetcode if you haven't. · click Sign...
Read more >I'm unable to login to support platform. Help - Help Center
If you are unable to login to this platform, you can always send us email to `support@leetcode.com` and we will get in touch...
Read more >Account Login - LeetCode
Sign In. Forgot Password?Sign Up. or you can sign in with. This site is protected by reCAPTCHA and the Google Privacy Policy and...
Read more >Bug In LeetCode
When you are trying to sign in with the options which you are showing like facebook,gmail etc,instead of ... But it fails in...
Read more >I can't run code, who can help me. - LeetCode Discuss
Login to Comment. samirpaul1's avatar · samirpaul1 334. May 18, 2021 11:15 AM. Read More. When non-premium users try to submit code very...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Spent an hour and figured it out. Here are the step by step instructions by people newbie like me.
Make sure Node.js 8+ is installed. Instructions can be found on the official page
Install leetcode-cli from OS terminal or the terminal within vscode. Installation guide. Note the “From Github” section links to an older version.
Type
leetcode version
in terminal to make sure you installed version 2.6.17+.Log into leetcode.com in a browser. In Chrome, right click and select “Inspect”. Switch to tab “Network”, “XHR”. Then click any button on leetcode.com(now should be on the left split screen). Now you should be able to see the cookie as @yihong0618 showed in the pic. Copy the entire cookie string starting from “__cfduid” and ending with “_gat=1”
Type
leetcode user -c
from terminal within vscode. Follow the prompt and type in your username and cookie you copied above.It works for me, thanks! To be more clear, the cookie is the entire String marked in Red in the pic.
Then, In leetcode VS Code, Ctrl + Shift + P, choose, log in with cookie. Your Username, The copied Cookies. Enter!