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

user authentication #83

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

aninda052
Copy link
Contributor

@aninda052 aninda052 commented Aug 30, 2023

This pr will close #35

server

  • user login and registration api added
  • hash password before storing in db using bcrypt package
  • add JWT based authentication system using jsonwebtoken package
  • setCurrentUser middleware is used for binding current user with request
  • loginRequired middleware will used for protected route
  • made /api/videos/update, /api/videos/delete and /api/videos/upload as protected route
  • store jwt token in cookies with httpOnly=true

client

  • integrate login and registration api
  • implement protected route
  • showing alert using global context & state
  • redirect anonymous user to login page and navigate them to their desire page after successful login.
  • after successful login, store user info in local storage

@aninda052 aninda052 marked this pull request as ready for review August 30, 2023 16:24
@aninda052 aninda052 marked this pull request as draft August 30, 2023 16:26
@aninda052 aninda052 marked this pull request as ready for review September 18, 2023 08:13
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

Successfully merging this pull request may close these issues.

add user authentication
1 participant