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 |
|
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✄1�7 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 登录顄1�7https://leetcode.com/accounts/login/ 首次登陆会生成一丄1�7 id名为recaptcha-token,这个就昄1�7@yihong0618 说的谷歌的1�7https://www.google.com/recaptcha/intro/v3.html 每次用户登陆的时候貌似都要检查一下这个hidden的value. 有没有办法存储在plugin临时文件釄1�7? 因为没有弄1�7发过plugin不清楚是否可行�1�7�1�7 <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. |
|
@lostindark |
That worked for me, Thanks! |
|
你好,邮件收到了,会尽快回复〄1�7
|
|
If you use chromium-based browsers there's this extension I made that you can use to copy cookies: |
|
Is it not possible to replicate this process in POSTMAN? |
|
你好,邮件收到了,会尽快回复〄1�7
|
|
can't login /Users/admin/.nvm/versions/node/v14.15.1/lib/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:519
user.paid = _user.isCurrentUserPremium;
^
TypeError: Cannot read property 'isCurrentUserPremium' of null
at /Users/admin/.nvm/versions/node/v14.15.1/lib/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:519:27
at Request._callback (/Users/admin/.nvm/versions/node/v14.15.1/lib/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:425:12)
at Request.self.callback (/Users/admin/.nvm/versions/node/v14.15.1/lib/node_modules/vsc-leetcode-cli/node_modules/request/request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (/Users/admin/.nvm/versions/node/v14.15.1/lib/node_modules/vsc-leetcode-cli/node_modules/request/request.js:1161:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (/Users/admin/.nvm/versions/node/v14.15.1/lib/node_modules/vsc-leetcode-cli/node_modules/request/request.js:1083:12) |
+1 |
|
I was able to use the Cookie way to log in. I don't know why it's not working last time. But this morning I tried it with my email and the cookie with the format of: csrftoken="xyz";LEETCODE_SESSION="xyz"; Hope this will help. |
|
I can confirm that it is possible to log in by entering your email and the cookie in the format of: |
|
it's still not working , i tried it with my email and the cookie with the format of: user.paid = _user.isCurrentUserPremium;
TypeError: Cannot read properties of null (reading 'isCurrentUserPremium') |
+1 |
|
Can not login with cookies. |
Same here. It was working till afternoon, but suddenly stopped working from evening. Please let me know if you were able to find a workaround. |
I'm having the same difficulties, but it's working again as of right now |
It works, thanks! |
|
你好,邮件收到了,会尽快回复〄1�7
|
|
Why don't just watch this https://www.youtube.com/watch?v=zNOJWXZ3i_Q |
|
你好,邮件收到了,会尽快回复〄1�7
|
helpful |
same |
|
你好,邮件收到了,会尽快回复〄1�7
|
same question, it was working fine in yesterday, but when I try to use this plugin today, it just cannot login. |
same question. It worked yesterday, but not today |
|
After adding some logs, it seems that the login requests are blocked by Cloudflare's JS Challenge. Have tried changing IPs and adding headers like User-Agent, but still not working. Perhaps it's related to some Cloudflare specified cookies to check if the request is from a browser or a script, not sure what to do next. |















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