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

Add Basic User Authentication #3

Open
Somya2010 opened this issue Jan 25, 2025 · 0 comments
Open

Add Basic User Authentication #3

Somya2010 opened this issue Jan 25, 2025 · 0 comments
Labels
enhancement New feature or request IWOC2025 Medium

Comments

@Somya2010
Copy link
Member

Description

Implement basic user authentication using JWT tokens to protect routes that require authentication.

Steps to Implement

  1. Install necessary packages (jsonwebtoken, bcryptjs).
  2. Implement a registration endpoint (POST /auth/register) that hashes user passwords.
  3. Implement a login endpoint (POST /auth/login) that returns a JWT token.
  4. Add a middleware to protect private routes using JWT verification.

Expected Outcome

The app will securely handle user authentication and protect certain routes with JWT.

@Durgesh4993 Durgesh4993 added enhancement New feature or request Medium IWOC2025 labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request IWOC2025 Medium
Projects
None yet
Development

No branches or pull requests

2 participants