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 #58

Closed
wants to merge 1 commit into from
Closed

Conversation

Ndevu12
Copy link
Contributor

@Ndevu12 Ndevu12 commented May 3, 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.
Screenshot 2024-05-03 at 15 35 54

Copy link

gitguardian bot commented May 3, 2024

⚠️ GitGuardian has uncovered 5 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 f52b228 src/test/signin.test.ts View secret
10624401 Triggered Generic Password f52b228 src/test/signin.test.ts View secret
10624402 Triggered Generic Password f52b228 src/test/signin.test.ts View secret
10624403 Triggered Generic Password f52b228 src/test/signin.test.ts View secret
10802115 Triggered Generic Password f52b228 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 added this to the Authentication and RBAC milestone May 3, 2024
@Ndevu12 Ndevu12 linked an issue May 3, 2024 that may be closed by this pull request
7 tasks
@Ndevu12 Ndevu12 added the Ready for reviews Pull request is ready for review label May 3, 2024
@Ndevu12 Ndevu12 requested a review from a team May 3, 2024 14:41
@Ndevu12 Ndevu12 force-pushed the feat-signin branch 2 times, most recently from 972ed14 to 7fc62fc Compare May 3, 2024 14:52
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.

@Ndevu12 !
Please resolve the conflicts and the Jobs are failing !

@faid-terence faid-terence assigned Ndevu12 and unassigned maxCastro1 May 5, 2024
@faid-terence faid-terence added In Progress This Label will be added on pending task Highest priority Has more priority and removed Ready for reviews Pull request is ready for review Highest priority Has more priority labels May 5, 2024
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