An open API service indexing awesome lists of open source software.

https://github.com/zeroasterisk/meteor-throttle-accounts

An extra layer to simplify throttling of Meteor Accounts
https://github.com/zeroasterisk/meteor-throttle-accounts

Last synced: about 1 year ago
JSON representation

An extra layer to simplify throttling of Meteor Accounts

Awesome Lists containing this project

README

          

# An Extension of zeroasterisk:throttle for Meteor Accounts

* http://throttle-example.meteor.com
* [https://github.com/zeroasterisk/Meteor-Throttle-Example](https://github.com/zeroasterisk/Meteor-Throttle-Example)
* main *throttle* package
* [https://github.com/zeroasterisk/Meteor-Throttle](https://github.com/zeroasterisk/Meteor-Throttle)
* [Atmosphere Package](https://atmospherejs.com/zeroasterisk/throttle)
* additiional *throttle* package
* [https://github.com/zeroasterisk/Meteor-Throttle-Accounts](https://github.com/zeroasterisk/Meteor-Throttle-Accounts)
* [Atmosphere Package](https://atmospherejs.com/zeroasterisk/throttle-accounts)

This Extension of that package will throttle login attempts and account
creation attempts for your site:

## Install

$ meteor add zeroasterisk:throttle
$ meteor add zeroasterisk:throttle-accounts

## Configuration

```
if (Meteor.isServer) {

// core Throttle config
Throttle.setDebugMode(false); // default = false
Throttle.setScope("global"); // default = global
// NOTE: if you switch to "user" here, no other Accounts specific scopes are functional

// Accounts.validateLoginAttempt()
ThrottleAccounts.login('global', 20, 1000, 'Under Heavy Load - too many login attempts');
ThrottleAccounts.login('ip', 3, 1000, 'Only 3 Login Attempts from the same IP every second');
ThrottleAccounts.login('connection', 8, 10000, 'Only 8 Login Attempts from the same DDP connection every 10 seconds');

// Accounts.validateNewUser()
ThrottleAccounts.create('global', 20, 1000, 'Under Heavy Load - too many accounts created');
}
```

## Example

This is integrated into the Meteor-Throttle example:

* http://throttle-example.meteor.com/
* https://github.com/zeroasterisk/Meteor-Throttle-Example

Project came from this forum post:

https://forums.meteor.com/t/how-to-use-zeroasterisks-throttle-with-softwareros-accountstemplates/2128