So you're checking if an email is already taken by sending it to the server, getting back a list of all registered emails, and then doing a client-side .includes() check? That's like asking the bank to give you everyone's account numbers just to verify yours doesn't exist yet.
Not only is this a massive security vulnerability (congrats, you just leaked your entire user database to anyone with DevTools open), but it's also hilariously inefficient. Why return an array of potentially millions of emails when the server could just return a boolean? The backend dev is probably crying somewhere.
The cherry on top? After doing all this client-side "validation," you're still showing success messages without any actual server confirmation. Chef's kiss of terrible architecture. 🤌
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++
Csharp