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

Changing Error messages on failed login #20

Open
leo-petrucci opened this issue Oct 12, 2019 · 0 comments
Open

Changing Error messages on failed login #20

leo-petrucci opened this issue Oct 12, 2019 · 0 comments

Comments

@leo-petrucci
Copy link

I'm having some trouble changing the default error messages jwt-auth sends back when login is failed.

At the moment I get something very specific like:

<strong>ERROR</strong>: invalid username. <a href="https://example.com/wp-login.php?action=lostpassword">Lost your password?</a>

I would like to:

  1. Make it less specific to make brute forcing harder
  2. Change the URL for the lost password page, since mine isn't the default wordpress one

How would I do this? I already tried adding:

	function remove_all_login_errors( $error ) {
    return "Incorrect login information";
	}
	add_filter( 'login_errors', 'remove_all_login_errors');

To my functions.php, however this just changed the error messages on the default wordpress login.

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

1 participant