hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
153 stars 136 forks source link

fix: Fixed the bug on email validation #924

Closed johnson-oragui closed 2 months ago

johnson-oragui commented 2 months ago

This Pull Request is intended to correct the bug that allows users to use an invalid email(non-existing domain part) for registration, login, request-magic-link, and reset-password. ​

Description

This Pull Request is intended to correct the bug that allows users to use an invalid email(non-existing domain part) for registration, login, request-magic-link, and reset-password. Prior to this PR, users were able to register, login with an invalid email like johnson.pragui@gmail.com.com or johnson.oragui@example.com, but with this fix, the email validation on these four endpoints mentioned above are now properly validated. ​

Related Issue (Link to issue ticket)

Invalid email on login

Invalid email on registration

invalid email on password reset

invalid email on magic-link

Motivation and Context

How Has This Been Tested?

This has been tested with pytest and postman. ​

Screenshots (if appropriate - Postman, etc):

bugfix email  com com

bugfix email

bugfix example come login

bugfix login

bugfix pytests

Types of changes

Checklist:

johnson-oragui commented 2 months ago

@trevorjob

Kindly reviews