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

Feat: signin a user with email and password #53

Closed
wants to merge 4 commits into from
Closed

Conversation

Ndevu12
Copy link
Contributor

@Ndevu12 Ndevu12 commented May 2, 2024

Description

This PR introduces a new feature that allows users to sign in using their email and password.
Also it Implement error handling for cases where the user tries to sign in with an invalid email or password.

Changes

  • Added a new endpoint POST /user/signin that handles user sign-in.
  • Implemented a function to validate the user's email and password.
  • If the validation is successful, the server responds with a cookie containing the user's access token.

Test Plan

  • Added unit tests for the POST /user/signin endpoint in signin.test.ts.
  • The tests cover the case where a user signs in with a valid email and password.
  • After all tests, the database connection is closed to prevent any hanging test cases.

Uploading Screenshot 2024-05-03 at 15.35.54.png…

@Ndevu12 Ndevu12 added the Ready for reviews Pull request is ready for review label May 2, 2024
@Ndevu12 Ndevu12 added this to the Authentication and RBAC milestone May 2, 2024
@Ndevu12 Ndevu12 requested a review from a team May 2, 2024 14:32
@Ndevu12 Ndevu12 self-assigned this May 2, 2024
Copy link

gitguardian bot commented May 2, 2024

⚠️ GitGuardian has uncovered 8 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
10624400 Triggered Generic Password d46968c src/test/signin.test.ts View secret
10624400 Triggered Generic Password d46968c src/test/signin.test.ts View secret
10624401 Triggered Generic Password d46968c src/test/signin.test.ts View secret
10624401 Triggered Generic Password d46968c src/test/signin.test.ts View secret
10624402 Triggered Generic Password d46968c src/test/signin.test.ts View secret
10624402 Triggered Generic Password d46968c src/test/signin.test.ts View secret
10624403 Triggered Generic Password d46968c src/test/signin.test.ts View secret
10624403 Triggered Generic Password d46968c src/test/signin.test.ts 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.

@Ndevu12 Ndevu12 linked an issue May 2, 2024 that may be closed by this pull request
7 tasks
@Ndevu12 Ndevu12 added In Progress This Label will be added on pending task and removed Ready for reviews Pull request is ready for review labels May 2, 2024
@faid-terence
Copy link
Collaborator

@Ndevu12 !!What's the progres ?

@Ndevu12
Copy link
Contributor Author

Ndevu12 commented May 2, 2024 via email

@faid-terence
Copy link
Collaborator

@Ndevu12 !
please squash the commit messages!!

@Ndevu12
Copy link
Contributor Author

Ndevu12 commented May 3, 2024

@faid-terence
That is what Am going to be working on

@Ndevu12 Ndevu12 force-pushed the ft-signin branch 3 times, most recently from be80e47 to 40ef364 Compare May 3, 2024 07:37
Copy link
Collaborator

@faid-terence faid-terence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't merge this PR !, Please squash commit messages !

@Ndevu12
Copy link
Contributor Author

Ndevu12 commented May 3, 2024

Now we have one commit

@Ndevu12 Ndevu12 added Ready for reviews Pull request is ready for review and removed In Progress This Label will be added on pending task labels May 3, 2024
@Ndevu12 Ndevu12 requested a review from faid-terence May 3, 2024 07:57
@coveralls
Copy link

coveralls commented May 3, 2024

Pull Request Test Coverage Report for Build 8935890322

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 73.099%

Totals Coverage Status
Change from base Build 8919969005: 0.0%
Covered Lines: 109
Relevant Lines: 136

💛 - Coveralls

@Ndevu12 Ndevu12 added In Progress This Label will be added on pending task and removed Ready for reviews Pull request is ready for review labels May 3, 2024
@Ndevu12 Ndevu12 removed the request for review from faid-terence May 3, 2024 10:24
@Ndevu12 Ndevu12 closed this May 3, 2024
@Ndevu12 Ndevu12 deleted the ft-signin branch May 3, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Progress This Label will be added on pending task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: User Sign In with Email and Password
3 participants