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

add new tests for buyers login #63

Merged
merged 1 commit into from
May 15, 2024

Conversation

EddyShimwa
Copy link
Contributor

@EddyShimwa EddyShimwa commented May 13, 2024

This pull request introduces improved two-factor authentication (2FA) for vendor accounts, enhancing login security and protecting against unauthorized access.

✅ Used MailGUN instead of node Mailer to reduce the time it takes to send the code to the Email from >45 seconds to <10 seconds

Implemented Features:

  • 2FA Setup API Endpoint: Vendors can enable 2FA through a dedicated API endpoint.
  • Email verification (basic implementation)
  • 2FA Verification during Login: Login attempts require a valid 2FA code in addition to the password.
  • Error Handling and Responses: Clear and informative error messages are provided for various scenarios.

Definition of Done:

  • All acceptance criteria are met.
  • Unit tests cover all functionalities.
  • Add the tests to check when the user is a Buyer to not enable 2fa authentincation
  • Code adheres to coding standards and best practices.
  • API documentation is included.
    Additional Notes:

Related Issues:
#31

To use the Code

##Screenshots
screen2
screen3
screen3

@EddyShimwa EddyShimwa force-pushed the feature-2FA-Authentication branch 5 times, most recently from 7d4f052 to 1c9c503 Compare May 13, 2024 16:53
@EddyShimwa EddyShimwa added the backend Good for newcomers label May 13, 2024
@EddyShimwa EddyShimwa self-assigned this May 13, 2024
@EddyShimwa EddyShimwa requested review from wayneleon1, jkarenzi, Habinezajanvier and bertrandshema and removed request for wayneleon1 and jkarenzi May 13, 2024 22:27
bertrandshema
bertrandshema previously approved these changes May 14, 2024
Copy link
Contributor

@bertrandshema bertrandshema left a comment

Choose a reason for hiding this comment

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

It is all good for me

jkarenzi
jkarenzi previously approved these changes May 14, 2024
wayneleon1
wayneleon1 previously approved these changes May 14, 2024
src/__test__/userController.test.ts Outdated Show resolved Hide resolved
src/controller/userController.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@Habinezajanvier Habinezajanvier left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@bertrandshema bertrandshema left a comment

Choose a reason for hiding this comment

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

Good now

Copy link
Contributor

@wayneleon1 wayneleon1 left a comment

Choose a reason for hiding this comment

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

That looks fine for me

@Habinezajanvier Habinezajanvier merged commit 7660e64 into develop May 15, 2024
3 checks passed
ambroisegithub pushed a commit that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants