-
Notifications
You must be signed in to change notification settings - Fork 280
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
override Login forbidden #216
Comments
Lets have a look at this block. But this is something to add to the configuration options! |
If I will set overrideLoginErrors to false then it will either show "user not found " or "Incorrect password". Is there any way to change these message "user not found" and "Incorrect password" ? thanks for your help. |
It is exactly the block I've linked above which does the trick! Try something like within your server code: var myMsg = "Incorrect Login";
Accounts.validateLoginAttempt(function(attempt){
if (attempt.error){
var reason = attempt.error.reason;
if (reason === "User not found" || reason === "Incorrect password")
throw new Meteor.Error(403, myMsg);
}
return attempt.allowed;
}); |
thank you. Its working .. |
I'm going to add this as a configuration option! |
Actually, after having looked again to the code, it turns out you could also change the mapping on accounts-t9n with: T9n.map('en', {
error: {
accounts: {
'Login forbidden': 'Not for you'
}
}
}); ...and you should do this for all languages you're interested int. Alternatively you could also change single login errors while keeping |
I experimented this same error using semantic:accounts-ui. I just remove the pack and greats news... it work... |
Still have the same issue with semantic-ui package |
which error/issue? |
Hi,
Can anyone help me to override the default authentication error message "Login forbidden" to "Incorrect Login" .
Thanks,
hare
The text was updated successfully, but these errors were encountered: