flask-security
flask-security copied to clipboard
Flash message after Reset Password page says "logged in automatically", but it isn't
The default flash message after resetting the password is: "You successfully reset your password and you have been logged in automatically."
However, in flask_security
- I don't see code that logs the user in.
- Fixing the default message breaks all the translations.
The workaround is to define SECURITY_MSG_PASSWORD_RESET, but I'm not sure if all programmers will realize that.
This is a valid bug since automatic login was removed upon password reset. All it needs is a PR updating the text. Good opportunity for a first time PR.
Hi there! I fixed this message in core.py and manually updated all of the translations as well but I'm unsure if that's the right approach for the latter. I tested the English version with an app I'm developing that utilizes Flask-Security and the message showed up correctly. I don't know how to use the translations so can't check those in a live environment.
Does this sound okay for a pull request or should I do some additional work first?
@deadlyraptor Thanks for following up! Do you mean that you replaced the key in all the *.po files? I think that's a good start. I'm guessing that all the translations in different languages would also need to be updated, but I'm pretty sure there isn't a single person who can understand and check all the languages. I can only check English and Japanese.
@kantorii Yes, I edited the *.po files. I used Google Translate since it was mostly a matter of cutting off the second part of the sentence ("...and you have been successfully logged in.") but there could easily be grammatical errors. I can only verify English and Spanish.
English "You successfully changed your password."
Spanish "Has restablecido tu contraseña con éxito."
Japanese パスワードの再設定が完了しました。
Let me know if there's anything else I can do on this one.
@deadlyraptor The Japanese is ok.
I have nothing more to say. I couldn't have done better :)
I wonder if @jirikuncar has anything to say.