-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fire signal when password verification fails #230
base: master
Are you sure you want to change the base?
Conversation
* Fire signal when user attempts to login with invalid password
Codecov Report
@@ Coverage Diff @@
## master #230 +/- ##
=========================================
Coverage ? 90.64%
=========================================
Files ? 25
Lines ? 1454
Branches ? 0
=========================================
Hits ? 1318
Misses ? 136
Partials ? 0
Continue to review full report at Codecov.
|
@lingthio Can this be merged yet?! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @CodeRhymesLife! Thank you a lot for your contribution! It's a really important functionality. I like that you updated docs and added a recipe :) I just have a suggestion before we can merge it.
|
||
# Send user_password_failed signal | ||
else: | ||
signals.user_password_failed.send(current_app._get_current_object(), user=user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that more appropriate place for this code is somewhere around here. Actually user_logged_in
is sent from that file too. So to not place this events (user logged in and authentication failed) too far from each other I would prefer both of them to be fired from user_manager__views.py
.
Addresses #214 where there is no way to be notified when a user attempts to login with an incorrect password.
These changes: