Prevent user creation from client

After installing accounts-password I discovered that Accounts.createUser can be called from the browser console. This feature is a spammer call. How can I prevent it of being called from the client side?

You can set forbidClientAccountCreation in global accounts config. More info here:

4 Likes
//Server
Meteor.startup(function() {
   Accounts.config({
        forbidClientAccountCreation: true
    });
});
2 Likes