Open ManpreetSingh18 opened 5 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 can you please review this PR?
I have mentioned it multiple times that we are going to use firebase for authentication. We don't need this.
@Swarnendu0123 I mentioned it before getting it assigned and you assigned it after my message stating the same Mongo db is mentioned in issue and also in the issue itself mongo db is mentioned . Additionally, the documentation includes MongoDB as well.
We will be using mongodb but not for the authentication. We will be using mongodb to store generated links and qrs. We will not store mongodb to store users.
@Swarnendu0123 ok, I will use Firebase. Now I am supposed to do everything mentioned in issue but in Firebase please check the video. You want that type of work in Firebase. Please confirm same?
I am planning to use the authentication service provided by firebase in this.
@Swarnendu0123 Here is the updated version of the code
Please review and label this PR @Swarnendu0123 .
@Swarnendu0123 any update???
Btw you are trying to implement server side firebase authentication. But firebase is actually designed such a way, that we can use it directly on the client. So we are trying to implement it on the client side.
I agree with you but according to #189 opened there, it is mentioned explicitly to use it this way. So I have done it according to the issue. @Swarnendu0123
Unfortunately, our development process doesn't allow us to have firebase on the server side.
@Swarnendu0123 Could you please clarify the details of issue #189? Multiple changes have been made due to a communication gap, and a clear and in depth description would help resolve it effectively for frontend am I supposed to use tailwind CSS?
@Swarnendu0123 Could you please clarify the details of issue #189? Multiple changes have been made due to a communication gap
I have clearly mentioned to use firebase for authentication. But I don't want to see a large change in a single PR. If you want to integrate firebase in click matrics, first implement the auth. Then the database using mongodb. Now the firebase is made for the client side not the server side. So use it in the client side. Use MongoDB in server side.
for frontend am I supposed to use tailwind CSS?
We are already using tailwind, you should continue with that only!
Also don't tag maintainers multiple times. We understand and respect your contribution in our community, but you don't need to mention any maintainers. We will see and respond by ourselves.
Related Issue(s)
Description
This pull request aims to implement user authentication for our backend project, including user register and LogIn functionalities. The implementation includes creating a User model, setting up authentication routes, and using Zod for input validation.
Key Features:
Changes Made
Created
user-model
model in `models' with fields for username, email, and password, including necessary validations.Added environment variables for JWT secret and bcrypt salt rounds.
Implemented Register route (
POST /api/auth/register
) inroutes/auth-router.js
:Implemented Login route (
POST /api/auth/login
) inroutes/auth-router.js
:Implemented Zod in following folder
middleware/validate-middleware.js
validators/auth-validator.js
Implemented Login and register in
controllers/auth-controller.js
Define routes in
routes/auth-router.js
Screenshots (if applicable)
https://github.com/oxiton-foundation/click-metrics/assets/72294811/57b1b0ee-9d75-4a2e-8f26-bbf24eaae1ae
When user with same email already exist
N/A
Checklist