stormpath / express-stormpath

Build simple, secure web applications with Stormpath and Express!
http://docs.stormpath.com/nodejs/express/
Apache License 2.0
325 stars 111 forks source link

Custom data not expanded with email verification on #549

Open mdeggies opened 7 years ago

mdeggies commented 7 years ago

Steps to reproduce:

  1. Make sure email verification is turned off for your directory, and add this init to server.js:
app.use(stormpath.init(app, {
    application: {
        href: 'https://api.stormpath.com/v1/applications/$APP_ID'
    },
    expand: {
        customData: true
    },
    postRegistrationHandler: function (account, req, res, next) {
        console.log('account:', account);
        next();
    },
    web: {
        register: {
            form: {
                fields: {
                    random: {
                        enabled: true,
                        label: 'Random',
                        name: 'random',
                        required: true,
                        type: 'text'
                    }
                }
            }
        }
    }
}));
  1. Create a new user and see that custom data is expanded & visible in the console.

  2. Turn email verification on for the directory and then restart the server. Create a new user and see that custom data is not expanded or visible in the console.

mdeggies commented 7 years ago

This was customer reported, so going to open.