Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So far Devise models are using method overloading, or monkey-patching in order to provide the right flash message to be shown to the user informing about the authentication failure reason.
While this work fine, it's hard to understand and to debug (like in which order are executed the functions?), plus it prevent one little case to work : when you're reaching the lockable
last_attempt
, before your account is locked, you only see one flash message while there should be actually two.All that was fine and nice until we added our own model (with a hook) to add exponential delay between login failures (quite common security request) showing a flash message with the delay to be waited before retrying a login attempt and being at the lockable
last_attempt
step : a flash message was missing.This PR update Devise so that:
Models.devise_messages
arrayModels.devise_messages
the wardenfail!
methodEarthfile
to easily run test suite on any platformTo be done
inactive_message
case in order to push message toModels.devise_messages
insteadunauthenticated_message
methodVERSION