Hook before before_login #469
Closed
i-h8-github
started this conversation in
General
Replies: 1 comment 1 reply
-
You probably want to use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to force a password reset since I'm migrating from a different database/login system (and to weed out bot accounts), and doing this by simply leaving out passwords in migration is easy enough.
However, I would like to inform the user that their password requires reset, i.e. by setting the error flash when they try to log in, but I can't find a more early hook to use than
before_login
. The problem is thatbefore_login
is only called before a successful login, and thus will never be reached if the password does not exist, which instead throws the:invalid_password
error.Any advice on the best way to proceed?
Beta Was this translation helpful? Give feedback.
All reactions