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

Solved Bugs related to Authentication #348

Merged
merged 4 commits into from
Jun 21, 2024

Conversation

Praveenkumar5048
Copy link
Contributor

This PR addresses and resolves bugs related to the authentication state and token storage in localStorage. With these changes, the authentication mechanism for the Foodie Application has been significantly improved.

Fixes #334

Type of change

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • [ X] New feature (non-breaking change which adds functionality)
  • Refactor code
  • Documentation update
  • Other (mentioned in the issue number)

Checklist

  • [ X] My code follows the style guidelines of this project
  • [X ] I have performed a self-review of my code
  • [X ] I have commented my code, particularly in hard-to-understand areas
  • [X ] My changes generate no new warnings
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

##Key updates include:

  1. Storing the authentication token in localStorage upon login, preventing repetitive logins after page refreshes.
  2. Clearing tokens from localStorage upon logout.

Files Modified

Navbar.js
Login.js
SignUp.js
authContext.js
server/controllers/auth.js (minor change)

Testing

I have tested these changes, and they work perfectly. Please feel free to merge them after resolving merge conflicts. I anticipate there might be significant merge conflicts, especially in the Navbar.js file, but I have thoroughly tested my code. I am open to any suggestions or modifications.
Thank You

Copy link

vercel bot commented Jun 20, 2024

@Praveenkumar5048 is attempting to deploy a commit to the vansh69's projects Team on Vercel.

A member of the Team first needs to authorize it.

@hustlerZzZ hustlerZzZ added gssoc This label is attached to the issues related to Gssoc'24 level3 labels Jun 21, 2024
Copy link
Collaborator

@hustlerZzZ hustlerZzZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work buddy

@hustlerZzZ hustlerZzZ merged commit b66a341 into VanshKing30:main Jun 21, 2024
0 of 2 checks passed
Copy link

Congratulations, Your pull request has been successfully merged 🥳🎉 Thank you for your contribution to the project 🚀 Keep Contributing!! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc This label is attached to the issues related to Gssoc'24 level3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUGS related to handling UseAuth() custom hook and clearing localStorage data after logout.
2 participants