I’m experiencing some weird login request. Do you know any existing package or feature in this case?
I’m not sure what you mean by “throttle” but if you have problems with login you can debug server side step by step and check what’s wrong.
The DDP rate limiter by default should already throttle login attempts:
1 Like
Thanks, DDPRateLimiter could be helpful.
I have a question: In the example:
// Define a rule that matches login attempts by non-admin users.
const loginRule = {
userId(userId) {
const user = Meteor.users.findOne(userId);
return user && user.type !== 'admin';
},
type: 'method',
name: 'login'
};
// Add the rule, allowing up to 5 messages every 1000 milliseconds.
DDPRateLimiter.addRule(loginRule, 5, 1000);
The userId() function, how do we have userId here if the user hasn’t logged in yet?