Problem:
There's no checking if the password is correct.
The app just continues as soon as it finds a password.
Solution:
Encrypt password with password. Store this string in localstorage.
When submitting password, try to decrypt the localstorage string.
Try / catch so you know it's the right pass.
Problem: There's no checking if the password is correct. The app just continues as soon as it finds a password.
Solution: Encrypt password with password. Store this string in localstorage. When submitting password, try to decrypt the localstorage string. Try / catch so you know it's the right pass.