Meteor SignUps Forbidden on Accounts.createUser -


i'm getting error "signups forbidden" when try create user account. ideas why?

my packages:

useraccounts:materialize materialize:materialize accounts-password accounts-facebook service-configuration accounts-google accounts-twitter kadira:blaze-layout msavin:mongol kadira:flow-router kevohagan:sweetalert

client code:

template.register.events({     'click #register-button': function(e, t) {         e.preventdefault();         // retrieve input field values         var email = $('#email').val(),             firstname = $('#first-name').val(),             lastname = $('#last-name').val(),             password = $('#password').val(),             passwordagain = $('#password-again').val();           // trim helper         var triminput = function(val) {             return val.replace(/^\s*|\s*$/g, "");         }         var email = triminput(email);          // if validation passes, supply appropriate fields         // meteor.loginwithpassword() function.             accounts.createuser({                 email: email,                 firstname: firstname,                 lastname: lastname,                 password: password             }, function(error) {                 if (error) {                     return swal({                     title: error.reason,                     text: "please try again",                     showconfirmbutton: true,                     type: "error"                 });                 } else {                     flowrouter.go('/');                 }             });          return false;     } }); 

server code

 accounts.oncreateuser(function(options, user) {     user.profile = options.profile || {};      user.profile.firstname = options.firstname;     user.profile.lastname = options.lastname;      user.profile.organization = ["org"];     user.roles = ["user"];      return user; }); 

update:

here link repo

the problem seems on .....meteor\local\build\programs\server\packages. if switch value false it's useless because resets on every build.

// client side account creation disabled default: // methos atcreateuserserver used instead! // disable client side account creation use: // //    accountstemplates.config({ //        forbidclientaccountcreation: true //    });  accounts.config({   forbidclientaccountcreation: true }); 

i had remove useraccounts:materialize in order solve problem


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -