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

#187419169 As a user, I can log into the E-commerce application via email & password #11

Closed
wants to merge 10 commits into from

Conversation

niyobertin
Copy link
Collaborator

What does this PR do?

This PR provide login functionality to the E-commerce with email and password and return token as result of successful login.
It also have a swagger documentation for user login functionality and unity test for login endpoints.

Description of Task to be completed?

Have the following endpoint working

GET /api/v1/users
POST /api/v1/users/login

How should this be manually tested?

After cloning the repostory from here, cd into it and run npm run dev to start the server.

  • Using using postman test every end point.
    Send GET request on localhost:8000/api/v1/users to get all users
    Send POST request ton localhost:8000/api/v1/users/login to login with email and password. successful login will generate a jwt.

  • Using browser like chrome,Firefox,etc .., send a request on localhost:8000/docs for swagger documentation for login.

  • Run npm run test for testing login end pint.

What are the relevant pivotal tracker/Trello stories?

#187419169

Screenshots
the screenshot below show successful login
successfull login

niyobertin and others added 10 commits April 17, 2024 09:46
…n the JWT token

-a user can login using email and password
-if sucessfull it will return Json webtoken
-if email & password miss match it will return message"bad compination
of email and password
-if email provided is not exist it will retun a message "User not found!
please register a new ancount"

[Finishes #187419169]
-swagger documentartion on user login with eamil and password
-test user login endpoint on successfull event and fail events

[Finishes #187419169]
 - user can be to sign up using name, username, email, and password.
 - user can't be able to sign up  twice using same email.

[Delivers #187431242]
Copy link

gitguardian bot commented Apr 18, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10286351 Triggered Company Email Password 9741ec3 src/sequelize/seeders/20240412144111-demo-user.js View secret
10286352 Triggered Generic Password 9741ec3 src/sequelize/seeders/20240412144111-demo-user.js View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

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.

2 participants