Disable DDP-rate-limiter for specific user accounts for login method

I have some e2e tests that require to change accounts several times. This triggers the DDP rate limiter. I want to remove DDP rate limiter for login attemps for specific accounts.

I tried to disable default rate limits and provide my own, but my problem is that I cannot match specific user accounts since userId is not yet set when the login attempt is made.

Is there a way to disable DDP rate limiter for login attemps on specific email accounts?


1 Like

workaround using Accounts.onLogin and after the test user account first login, I disable DDP LIMIT on its IP for the next 5 minutes.

Another option is to wrap Accounts.removeDefaultRateLimit(); with if (Meteor.isTest || Meteor.isAppTest) { ... }.