oxiton-foundation / click-metrics

Click Matrics is a powerful URL shortening and analytics platform designed to streamline the process of generating short URLs, creating QR codes, and tracking detailed analytics for each link.
https://click-metrics.vercel.app
MIT License
30 stars 44 forks source link

GSSoC: Implement User Authentication Routes and Model with Zod Validation #89 #106

Closed himanshuraimau closed 4 months ago

himanshuraimau commented 4 months ago

Description:

This pull request adds user authentication routes and a user model with Zod validation to our backend project. The implementation includes signup and signin routes, password hashing, and environment variable setup.

Changes Made:

Tasks Completed:

  1. Created User Model:

    • Defined a User schema with Mongoose.
    • Included fields for username, email, password, etc.
    • Added Zod validation for input fields.
  2. Implemented Authentication Routes:

    • Created signup and signin routes.
    • Validated input using Zod.
    • Hashed passwords before saving to the database.
    • Returned appropriate responses for successful and failed authentication attempts.
  3. Environment Variables:

    • Added environment variables for JWT secret and bcrypt salt rounds.

Proposed Solution:

Additional Notes:

This pull request lays the foundation for user authentication in our backend application. Further enhancements and refinements may be required based on feedback and testing.

Video:

Screencast from 2024-05-31 00-39-39.webm

Request for Review:

Please review the changes and provide feedback as necessary. Your input is valuable in ensuring the reliability and security of our authentication system.

Thank you!

github-actions[bot] commented 4 months ago

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our #24. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

Swarnendu0123 commented 4 months ago

Resolve the conflicts!

Swarnendu0123 commented 4 months ago

Remove package.json and user creation logic, as will will not follow this process to create users, we will use firebase for auth.

himanshuraimau commented 4 months ago

can i setup the firebase auth? also can you merge this pull request i will change the further issues. thank you!

Swarnendu0123 commented 4 months ago

As I couldn't review >1000 changes. I will appreciate it, if you create separate PR.

himanshuraimau commented 4 months ago

Ok let me see. Actually I also got the git conflict the first time so I was kinda confused.