Skip to content
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

redirect to the desired page if the password is incorrect #336

Closed
Halvanhelv opened this issue May 11, 2023 · 1 comment
Closed

redirect to the desired page if the password is incorrect #336

Halvanhelv opened this issue May 11, 2023 · 1 comment

Comments

@Halvanhelv
Copy link

How can I make sure that if the password was entered incorrectly when trying to update the redirect to the correct page was not the standard rodauth (I have a form to change the password is located next to other forms of updating the user's personal data)

@janko
Copy link
Contributor

janko commented May 12, 2023

The after_login_failure hook will fire when email was correct but password wasn't, so you can redirect from it:

after_login_failure do
  set_redirect_error_flash "#{login_error_flash}#{invalid_password_messsage}"
  redirect "/settings/account"
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants