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 encounter the same issue initially. However, I found that we could use plugin to solve it. Steps are below:
|
what you mean for cookie.chrome, I cannot find such a plugin. |
|
This extension simply doesn't work. |
|
@BismeetSingh |
Does it work with gmail?I cant afford to lose my progress via a new account. |
Not, or you can copy the cookie with login with cookie, the setups you can find in this issue. |
|
@yihong0618 |
|
@yihong0618 |
My pleasure. |
|
@yihong0618 Maybe we need to add the login related steps into the readme page? what do you think? |
@jdneo maybe just a link to vscode-leetcode wiki like you did before, because there may have some setups and leetcode and leetcode are different that made readme bigger. |
|
Sure, would you mind to add them in the wiki? |
Of course, maybe I can try this this weekend~ |
|
@yihong0618 Thank you, as always |
|
@yihong0618 @jdneo |
|
Thats true. The cookie format has been changed and there's no "_sat=1" string towards the end of the cookie anymore. Gives the same error as above:
|
|
any thought or solution on that? Same problem here. |
|
1、找到leetcode插件位置,打开leetcode.js,找到这个位置 然后保存,之后在vscode登录leetcode, 选择直接登录,账号密码随便输入就行 |
|
@python-spider-wsc 老哥,是安装你那个步骤改完,还是没登录进去呢,你那边可以吗? |
|
@lengband 可以啊,你选择的是国内版吗,注意leetcode.js改成这样 |

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: