Skip to content
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

not logged in error #84

Closed
muesli-dev opened this issue Mar 12, 2024 · 3 comments
Closed

not logged in error #84

muesli-dev opened this issue Mar 12, 2024 · 3 comments

Comments

@muesli-dev
Copy link

I can't download the Tailwind CSS with my credentials. I bought the single dev license and can't download it with this crawler, after the first fetch (login) it says login success after that the next fetch says "not logged in"

@muesli-dev
Copy link
Author

muesli-dev commented Mar 12, 2024

i found a "simple" fix for the problem.

Replace the parseSetCookieHeaders Function with the following (index.mjs:161):

function parseSetCookieHeaders(header) { let cookies = {} const [cookie] = header.split(';') const [name, value] = cookie.split('=') cookies[name] = decodeURIComponent(value) return cookies }

Then open your chrome, log in to tailwind ui, open your console (F12), go to network and reload the website.
The first request should contain a cookie with your authentication. Copy all cookie data/text.

image

Put your cookie into this let like that with "" (index.mjs:74):

image

Last step is to remove the code that overwrites your set cookie with the first login request.
Remove or comment out the code. (index.mjs:100-104)
image

tad-da! the login is now taken care of by your "stolen" token, and you can fetch the tailwind css.

image

@kiliman
Copy link
Owner

kiliman commented Mar 12, 2024

Hmm... I'll take a look at the code that is setting headers. I'm wondering if the spread syntax is not working correctly in some cases.

@sujeetpillai
Copy link

@muesli-dev Thanks for this. I'll test this out on my side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants