kawre / leetcode.nvim

A Neovim plugin enabling you to solve LeetCode problems.
MIT License
655 stars 34 forks source link

Unable to authenticate #16

Closed arorashivoy closed 6 months ago

arorashivoy commented 8 months ago
image

When I am logging in the api returns meta name as robot and I am unable to login. Even after doing :Leet fix and re-signing using the cookie it takes me to the menu but is unable to fetch problems with error user not signed in

image

Also, when I open leetcode on browser as well it is making me check I am not a robot checkbox.

kawre commented 8 months ago

Sadly leetcode does have often server outages and one way of dealing with this is they enable some sort of pre user authentication via cloudflare. Same thing happend earlier today and it lasted at most few hours.

As of now i have no clue how this authentication works but i will look into this and maybe find ways to bypass this

tvntvn13 commented 8 months ago

Having the same issue. It seems to be a leetcode related problem, as the LeetBuddy.nvim isn't able to authenticate either. Hope it'll be only a temporary thing.

arorashivoy commented 8 months ago

I found a python module named cloudscraper. This module is specifically used to bypass this and since cloudflare changes it frequently it would be a lot of work handling that on your own.

So, I think this library can help it might still say unable to authenticate when sometimes cloudflare changes it way but the guy who made this says he will update this repo frequently.

If you want I can help with this project. I would just need some KT as I have never worked on a nvim plugin as I am pretty new to neovim community but would love to get started.

darzok0914 commented 8 months ago

I had the same issue earlier using a personal app based on curl. I looked into it and yes it seems to be a cloudfare anti bot security feature.

After doing some googling I found this link

https://www.zenrows.com/blog/bypass-cloudflare#passive-bot-detection

That explains how to bypass that. I'll try on my end next week

kawre commented 8 months ago

@arorashivoy if you want to collaborate, open a pull request. I will let you know about the rest tomorrow

cambp4 commented 8 months ago

The problem is gone on my end, is this still an issue for others?

kawre commented 6 months ago

Closing because, from my understanding, this is not something that I can fix. From what I've observed, this additional authentication shouldn't last more than a few days at a time at most.