Step 1 Install BuildProp Editor from Play Store
Reboot, setup Wi-Fi & reboot again
WiFi should now remember passwords if there was an issue with secure storage.
Step 2 ---> if the prob exists I'd suggest you to go into /data/misc/wifi/ and find the *wpa_supplicant.conf file. In this file the device stores every WiFi entry.
Open it and see if there are duplicates: when you enter a password more than once this file creates more than one voice, resulting in multiple entries for the same network.
If this is the case then it's normal that the device asks you for the password again (because in case of entries conflicts it doesn't know which one to use).
I have noticed in my case in the same folder /data/misc/wifi/ there is another file named wpa.supplicant.bak.conf what i did (i don't know if its risky) I deleted this wpa.supplicant.bak.conf file and rebooted and connected and input my password normally, this time the file *wpa_supplicant.conf seems to store my password and i rebooted to check, and wow, i did it. now its storing all the passwords.
please let me know if it helped anybody.