ngoworldcommunity / NGOWorld

A platform to connect and support NGOs, charities and you to build a better tomorrow.
https://ngoworld.org
MIT License
359 stars 418 forks source link

Bug: Problem in Footer after Logging In #1070

Closed ayushmangarg2003 closed 10 months ago

ayushmangarg2003 commented 12 months ago

Description

According to Code in Footer.jsx, after successful login their should be "EVENTS" instead of "Join Us" But this is not happening.

Here I have logged in :- Screenshot (40)

I don't think I can solve this because it is related to authToken I guess but I feel that this needs to be solved.

Screenshots

No response

Browser 🥦

Brave

Checklist ✅

github-actions[bot] commented 12 months ago

Hello @ayushmangarg2003, thank you for raising the issue.

Currently, the issue is marked as https://github.com/MilanCommunity/Milan/labels/%F0%9F%91%B7%F0%9F%8F%BB%E2%80%8D%E2%99%82%EF%B8%8F%20status%3A%20awaiting%20triage which means that work for this issue is on hold and we are waiting for the maintainers/owner to review it and provide you with feedback/suggestions to proceed further.

Feel free to reach out to Tamal on Twitter, or drop a mail at tamalcodes@gmail.com if you think that this issue is of critical priority.

Give us a ⭐ to show some support Happy OpenSource 🚀

tamalCodes commented 12 months ago

That makes sense, thanks for raising the issue. @ayushmangarg2003

tamalCodes commented 12 months ago

Hi @venkadesh004 there are multiple things wrong with the PR as a result I had to close that. Please ask before raising the issue. Since this was related to cookies I needed to look this up first. Secondly please don't change the PR template.

You wrote Issue No: #1070 , whereas in the template it was mentioned that the issue must be linked in the format of Closes #1070

Please make a new PR to the beta branch.

YuvarajSingh-0 commented 11 months ago

Is this issue being resolved? or can I look into it?

tamalCodes commented 11 months ago

@YuvarajSingh-0 , this is not being worked upon, would you like to work on it ?

YuvarajSingh-0 commented 11 months ago

@tamalCodes sure.... But I need to discuss some things like... Data base access

tamalCodes commented 11 months ago

@tamalCodes sure.... But I need to discuss some things like... Data base access

You don't need any kind of Database access, set up the frontend and the backend locally. You can spin up a local MongoDB connection which is free, and simply paste the URI in the .env of the Backend repo. Once the backend is up and running, start the Frontend too.

Once that is done make an account and signup. Look at the cookies section in the Application > Cookies tab, you will find a cookie called isLoggedIn which is set to be true. You can use that cookie directly in the Footer.

Use conditions like



{ Cookies.get("isLoggedIn") ? (Write the code) : (Write the code) }
YuvarajSingh-0 commented 11 months ago

@tamalCodes I found that there are some typos with the token name here and there and there is also an issue with the backend side of setting cookie. While setting cookie, the httpOnly property is set to false and secure to true for both cookies to true, otherwise the cookie is not accessible in the code. So, I fixed it.

There is also some issues with the logout it seems. Working on it.

Please tell me if there is something that bothers you. Thank You.

YuvarajSingh-0 commented 11 months ago

Fixed the backend code also, how do I reference this issue in the backend repo? Just a hyperlink with markdown language is enough??

keshav-gupta19 commented 11 months ago

Is the Problem solved or may i look into it?