covidwatchorg / portal

Covid Watch Portal web app for diagnosis verification
Apache License 2.0
8 stars 3 forks source link

When resetting password, new password can't be same as curreent password #416

Open jcolla-holla opened 4 years ago

jcolla-holla commented 4 years ago

From Jeff

ibeckermayer commented 4 years ago

Resolved for ResetPasswordModal.js, but still needs to be solved for ChangePasswordModal.js.

This is a bit trickier -- I think the best way to do this is to try and login with the user's username/new-pass, and if it works then we complain at them (since it means that new-pass is the same as old-pass). This might be done on the frontend, however it could cause some sluggishness by triggering the __authStateListener in store/index.js. If that's the case, then we can make this check a cloud function.