I am implementing an app that so far contains a login and signup window.
I want to know what is the best way to handle the form in this window.
I want this form to POST to a REST server, using an API, and that server will then communicate with a database.
The mechanism now is that when the submit button is pressed, the user input will be processed, and I will make a POST request using the nodejs request package, sending the user information to the server. That server then compares the data with the database, and will respond back with a status code, depending on the situation(the user exists or not, or there is an error).
I am not sure if this is fine. I’ve seen that you could also use the form’s action attribute to POST to a route, but how should I handle the validation of the user’s data?
Can you also point me to some tutorials that point to a user authentication mechanism on electron that implement MVC?(since I have a client, a server, and a database)
Or any tips will be amazing.