Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should you store user login details in the same database as your website?

Basically, I want to create a restricted HTML front end to present and edit fields in a database. Users will have to log in with a username and password to gain access. Would you store the user login details in the same database but in a separate table, or in an entirely different database?

like image 429
Col M Avatar asked Oct 16 '25 15:10

Col M


1 Answers

I store user information in the same database, I just create a users table that stores their username email and hashed password. Make sure to hash and salt the passwords before they are inserted into the database.

like image 200
tim Avatar answered Oct 18 '25 08:10

tim