User Authentication / Database Security

Hi there, I am trying to make a database using uGameDB but there are some things I’m uncertain about.

How would I go about creating an authentication system that is actually secure? I have some code for one written up but the password field I am uncertain about. I need to make sure that the game can read it, that the user can request their password back via email, and that human’s can’t read it from the database (i.e encrypted).

I can not find valid information on this that relates to what I’m doing, can anyone point me in the right direction?

Thanks

If you can send them the password back via email, that’s the first point where you throw security out of the window…

see this: How NOT to Store Passwords! - Computerphile - YouTube