meteor accounts-ui-bootstrap-3 email signup form does NOT show email field

561 views Asked by At

New to meteor.

Having problems configuring accounts-ui-bootstrap-3. {{> loginButtons}} shows OK but when clicked there is NO email address field!

In server>accounts.js I have

// setup accounts on meteor startup
Meteor.startup(function(){
    // configure accounts
    Accounts.config({
        sendVerificationEmail: true,
        forbidClientAccountCreation: false
    });
});

I have the following packages installed:

meteor-platform
autopublish
insecure
jquery
iron:router
dburles:google-maps
accounts-password
twbs:bootstrap
ian:accounts-ui-bootstrap-3
accounts-facebook
email
accounts-google
accounts-twitter
1

There are 1 answers

0
rbell01824 On BEST ANSWER

Several issues:

As pointed out by uZar accounts-base needs to be installed.

Additionally, accounts needs to be configured on both the Client and server side.

On the server:

Meteor.startup(function(){
// setup to send email
smtp = {
    username: 'xxxxx',       // eg: [email protected]
    password: 'xxxxx',     // eg: 3eeP1gtizk5eziohfervU
    server:   'xxxxx',       // eg: mail.gandi.net
    port: 587
};
process.env.MAIL_URL = 'smtp://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '@' + encodeURIComponent(smtp.server) + ':' + smtp.port + '/';

// configure accounts
Accounts.config({
    sendVerificationEmail: true,
    forbidClientAccountCreation: false
});
...
});

On the client:

// configure accounts
Accounts.ui.config({
    passwordSignupFields: 'USERNAME_AND_EMAIL'
});

If you want to add fields to the registration, on the client:

Accounts.ui.config({
    requestPermissions: {},
    extraSignupFields: [{
            fieldName: 'terms',
            fieldLabel: 'I accept the terms and conditions',
            inputType: 'checkbox',
            visible: true,
            validate: function(value, errorFunction){
                if (value != 'true') {
                    errorFunction("You must accept the terms and conditions.");
                    return false;
                } else {
                    return true;
                }
            },
            saveToProfile: false
        }]
});