szabolcsx
13th February 2015, 08:35
Hi. I need some help to decide which is the correct method of implementing a login system with Qt and MySql.
The first method which can be found everywhere on the internet is the following: Make a table called users in MySql. Create a username and a password column, and query from the user it's username and password then verify if those matches with the pair in users table. My problem with this method is that I need to hardcode/save to disk the server's login credentials(username and password).
The second method would be creating MySql accounts for all users. Using this method, the user will be queried for the server's username and password and I can avoid hardcoding/saving to disk those credentials.
Which is the correct method? Or I misunderstood the whole concept and there is an other method?
Thank you for your help :)
Update:
The third option would be to implement a layer between the server and end-user application which is hosted alongside server. So the credentials would never leave the server.
The first method which can be found everywhere on the internet is the following: Make a table called users in MySql. Create a username and a password column, and query from the user it's username and password then verify if those matches with the pair in users table. My problem with this method is that I need to hardcode/save to disk the server's login credentials(username and password).
The second method would be creating MySql accounts for all users. Using this method, the user will be queried for the server's username and password and I can avoid hardcoding/saving to disk those credentials.
Which is the correct method? Or I misunderstood the whole concept and there is an other method?
Thank you for your help :)
Update:
The third option would be to implement a layer between the server and end-user application which is hosted alongside server. So the credentials would never leave the server.