So I am having a very critical bug in my production app, which occurs completely randomly.
Sometimes users just can’t login, even though the credentials are correct.
I have a React frontend with my login code looking a bit like this:
login = (e) => {
e.preventDefault();
const login = this.loginInput.current.value;
const password = this.passwordInput.current.value;
if(!login || login.length == 0) return Bert.alert('Bitte geben Sie eine E-Mail Adresse oder einen Usernamen ein.', 'danger');
if(!password || password.length == 0) return Bert.alert('Ohne Passwort wird das nix! ;-)', 'danger');
Meteor.loginWithPassword(login, password, (error) => {
if (error) {
Bert.alert(error.reason, 'warning');
} else {
const { location, history } = this.props;
if (location.state && location.state.nextPathname) {
history.push(location.state.nextPathname);
} else {
history.push('/order');
}
}
});
}
So the Error 403 - User not found occurs, even though the user definitely exists.
Did anyone ever experience this problem? I am not sure what to do, this obviously has to work 100% of the time if the credentials are correct.
please help!
cheers, P