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
Failed to log in with a leetcode.com account #478
Comments
|
+1 |
|
How to make it works? |
|
+1 |
1 similar comment
|
+1 |
|
I have the same problem that I switched to leetcode-cn endpoint yesterday but cannot login my leetcode account anymore. I have tried to use the mobile's hotpot and vpn global mode, still failed. Is there any solution to solve this problem? P.S. reinstalling cannot solve this. Extension Outputlogin: login: Active Name Version Desc✘ solution.discuss 2019.02.03 Plugin to fetch most voted solution in discussions. TypeError: Cannot read property 'toString' of undefined |
|
same issue |
|
+1 |
|
+1 |
1 similar comment
|
+1 |
|
+1 |
|
same issue |
|
same bug here, can not login while same username and pw are working fine on leetcode website |
|
+1, the same issue. |
|
+1, same issue |
|
same |
|
Hi @ALL, Sorry I'm busying with my work these days. Hope we could have volunteers who are interested to provide fixed in the upstream repo: https://github.com/leetcode-tools/leetcode-cli |
|
Hi @jdneo I try to fix the problems in leetcode-cliBut leetcode.com use recaptcha which is hard to generate the token when use post to login.
|
|
@yihong0618 Thank you for the great effort! I guess if leetcode has applied the recaptcha token. leetcode-cn will finally migrate to it in some time. Hope we can find a way to resolve it. Thank you again! |
|
+1 |
|
@jdneo 登录页https://leetcode.com/accounts/login/ 首次登陆会生成一个 id名为recaptcha-token,这个就是@yihong0618 说的谷歌的https://www.google.com/recaptcha/intro/v3.html 每次用户登陆的时候貌似都要检查一下这个hidden的value. 有没有办法存储在plugin临时文件里? 因为没有开发过plugin不清楚是否可行。 <input id="recaptcha-token" type="hidden" value="03AOLTBLRLMf9Mib_S4ixPeHd9qQQjEpPRvs1NVhsWvJogjBEZriWO-0L58e5Umzd3b5l98t2vW2s532-jSRqQRr23lZuJSx_PyClRRIjK4Wjv6pUh5pafJRvLLYTZqMbJ3JtiwlohtKDiggB6yYqsFZNY_t8IDnHlWKivV4SvW6nCSGjg4aFGTfySip7QlUQv5N54E_V4BmmffNoLrEr2tMgiODzSCy7TbA9rUHO4RbI30HQsF4sZt9pGk3u2RbUaeNxDWqyxeTuvPOrz8LgNoOeST142GkHHoCiVwbFcm1lPDBLizIbKpf77YwNdg0FhtqJq1SJcq35PniBEdEMH8EMB_kH2KJcTK51_X_cqUH2ddOzMxwoMPn95lQn5m7w3UjKPUxI-zAKDRtEook66jJK3TNwT7QdTK3edZjNs1znypTgA0Et3kO8">const opts = {
url: config.sys.urls.login,
headers: {
Origin: config.sys.urls.base,
Referer: config.sys.urls.login,
Cookie: 'csrftoken=' + user.loginCSRF + ';'
},
form: {
csrfmiddlewaretoken: user.loginCSRF,
login: user.login,
password: user.pass
//probably here, we might need one more recaptcha-token
}
}; |
|
@CoolersCoder |
|
This problem is a little bit tricky. Recaptcha is hard to deal without a browser. I can think of 2 ways to fix this:
None of these are simple, maybe we should talk to leetcode and see if there are any support way of login for plugins? |
|
@lostindark Thank you, I'll try to reach leetcode recently. But I'm not sure who should be talked to. If anyone knows, please let me know. |
|
@yihong0618 Have you tried to turn headless off? The other way to try is to set a normal chrome user agent and see if that works. |
I don't know why, but after trying several times, I logged in via this method for now. |
|
this method is still working |
|
You should look at how the algorithm extension, which is similar to this tries to log in. That extension can still log in to leetcode , although it does not work. |
|
the login is awful! : ( if you want sync use configuration in the vscode can use github.com account login . So the leetcode plugin need forward the login, beacuse I used github.com to login the leetcode website. |
|
Hi, Thanks |
|
Login from Github--third party is causing error |
@saksham1211 You have to copy the entire cookie string. |
@markhicken Thank you so much for your response but it is not working for me. The screenshot which you shared, is it recent? because I am having different output in the Network tab. |
|
I am stuck at this point. I have tried everything from changing endpoints to different login methods. None of them is working. Below is the screenshot where I am stuck, using cookies login method, tried on both endpoints I am getting this output and it is stuck at this. |
This is still working |
Yes. I logged in this way yesterday. 🤷🏼 |
@markhicken I am unable to log in, my cookie looks different than what you shared in the screenshot, even though I put my cookie, the output gets stuck in "Retrieving user information" and doesn't log in right away. |
|
The prompt doesn't clarify what format do we need to input. There's no field starting with "__cfduid" or with "_gat=1" in the cookie these days. Wasting 10 minutes browsing the post and finally I found the answer: cookies with the format of semicolon separated pairs. (You need all the cookies, not a single field) Fuck leetcode-cli, you don't want it. Install EditThisCookie extension and change the export format and export the cookie. That's it. |
|
Hey, |
+1 |
|
Just to confirm what worked for me, thanks to whoever posted the solution.
|
|
Another update, the cookie feature only seems to be working on the US endpoint. |
This works, thanks. |
|
你好,邮件收到了,会尽快回复。
|
|
Confirmed: cookie login works for US endpoint. |
this is the correct answer. |
|
你好,邮件收到了,会尽快回复。
|
|
@saksham1211 Did you find a solution somehow? |
|
你好,邮件收到了,会尽快回复。
|
On macOS Monterey using Safari
In VScode
|
Thanks for your help. I also tried to use the username and cookie directly(the 4th option in below screenshot), so lucky either. |
|
sorry,bro i still not solve this problem!!! But now i do leetcode in website!
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2022年2月22日(星期二) 凌晨2:08
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [LeetCode-OpenSource/vscode-leetcode] Failed to log in with a leetcode.com account (#478)
@saksham1211 Did you find a solution somehow?
I have the same issue with you and none of the above solutions works.
BTW, I am on macOS Monterey.
Can anyone help, please? Thank you so much
On macOS Monterey using Safari
|
|

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

















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
Your Environment
The text was updated successfully, but these errors were encountered: