ani1609 / Spendwise

Spendwise - Your User-Friendly Expense Tracker
https://spendwise-seven.vercel.app/
MIT License
25 stars 49 forks source link

Validation for email field in Signup form #239

Closed Anuj-Gill closed 10 months ago

Anuj-Gill commented 10 months ago

Bug During signup, entering only "mail@a" as the email address is incorrectly accepted. This email lacks the expected format with a domain name and top-level domain, making it invalid.

Solution This can be fixed with ZOD validation library.

Screenshots image This get's accepted and I got signedup!

Anuj-Gill commented 10 months ago

@ani1609 @niladrix719 Please assign this issue to me. I am learning express and learned about ZOD validation library, so I think I can fix this bug for KWoC.

ani1609 commented 10 months ago

@Anuj-Gill we have decided to shift the authentication process to firebase authentication where the users will be sent a verification link over email. Will your idea be helpful in that scenario?

Anuj-Gill commented 10 months ago

@ani1609 I believe yes, because we can use ZOD to pre-validate the email address format before sending it to Firebase for verification. This can improve server efficiency by catching obvious errors beforehand.

niladrix719 commented 10 months ago

@Anuj-Gill sure go ahead

ani1609 commented 10 months ago

@Anuj-Gill any update?

Anuj-Gill commented 10 months ago

@ani1609 I have created a PR. Please have a look.

ani1609 commented 10 months ago

@Anuj-Gill done