How to create user accounts in MongoDB? -


i wonder what's 'correct' way create user accounts in mongodb , actions register/login. have create specific collection users (username,email,password) or mongodb has built in users?

if have create users collection manually, how deal password encryption? thanks.

you'll have create , manage collection of users manually.

as encrypting passwords, common approach hash passwords using suitable hash-function before store them in db. later, when user tries login use same hash-function on string entered in password field , compare result password entry in db. way never store actual passwords , if hacks won't users passwords, hashes.

for security (against dictionary attacks) should salt hashed passwords. read here


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -