var crypto = require('crypto');

module.exports = [{
    type: 'input',
    name: 'application:name',
    message: 'Type your application name',
    default: 'sails-rest-api'
}, {
    type: 'input',
    name: 'application:api-secret-key',
    message: 'Type your private API key',
    default: crypto.randomBytes(32).toString('hex')
}, {
    type: 'input',
    name: 'application:jwt-secret',
    message: 'Type your private key for JSON Web Token',
    default: crypto.randomBytes(32).toString('hex')
}, {
    type: 'confirm',
    name: 'application:passport-facebook-enabled',
    message: 'Do you need Facebook authorization?',
    default: false
}, {
    type: 'input',
    name: 'application:passport-facebook-client-id',
    message: 'Type your Facebook Client ID',
    default: '-',
    when: function (answers) {
        return answers['application:passport-facebook-enabled'];
    }
}, {
    type: 'input',
    name: 'application:passport-facebook-client-secret',
    message: 'Type your Facebook Client Secret',
    default: '-',
    when: function (answers) {
        return answers['application:passport-facebook-enabled'];
    }
}, {
    type: 'confirm',
    name: 'application:passport-twitter-enabled',
    message: 'Do you need Twitter authorization?',
    default: false
}, {
    type: 'input',
    name: 'application:passport-twitter-client-id',
    message: 'Type your Twitter Client ID',
    default: '-',
    when: function (answers) {
        return answers['application:passport-twitter-enabled'];
    }
}, {
    type: 'input',
    name: 'application:passport-twitter-client-secret',
    message: 'Type your Twitter Client Secret',
    default: '-',
    when: function (answers) {
        return answers['application:passport-twitter-enabled'];
    }
}, {
    type: 'confirm',
    name: 'application:passport-yahoo-enabled',
    message: 'Do you need Yahoo authorization?',
    default: false
}, {
    type: 'input',
    name: 'application:passport-yahoo-client-id',
    message: 'Type your Yahoo Client ID',
    default: '-',
    when: function (answers) {
        return answers['application:passport-yahoo-enabled'];
    }
}, {
    type: 'input',
    name: 'application:passport-yahoo-client-secret',
    message: 'Type your Yahoo Client Secret',
    default: '-',
    when: function (answers) {
        return answers['application:passport-yahoo-enabled'];
    }
}, {
    type: 'confirm',
    name: 'application:passport-google-enabled',
    message: 'Do you need Google Plus authorization?',
    default: false
}, {
    type: 'input',
    name: 'application:passport-google-client-id',
    message: 'Type your Google Client ID',
    default: '-',
    when: function (answers) {
        return answers['application:passport-google-enabled'];
    }
}, {
    type: 'input',
    name: 'application:passport-google-client-secret',
    message: 'Type your Google Client Secret',
    default: '-',
    when: function (answers) {
        return answers['application:passport-google-enabled'];
    }
}];

@@ -504,38 +504,39 @@
 , %7B%0A    type: 'c
-onfirm
+heckbox
 ',%0A    name: 'ap
@@ -558,97 +558,325 @@
 ort-
-facebook-enabled',%0A    message: 'Do you need Facebook authorization?',%0A    default: false
+enabled-strategies',%0A    message: 'Choose which Passport strategies you want',%0A    choices: %5B%7B%0A        name: 'Facebook',%0A        checked: true%0A    %7D, %7B%0A        name: 'Twitter',%0A        checked: false%0A    %7D, %7B%0A        name: 'Yahoo',%0A        checked: false%0A    %7D, %7B%0A        name: 'Google',%0A        checked: false%0A    %7D%5D
 %0A%7D, 
@@ -1088,34 +1088,61 @@
 assport-
-facebook-enabled'%5D
+enabled-strategies'%5D.indexOf('Facebook') %3E -1
 ;%0A    %7D%0A
@@ -1369,179 +1369,60 @@
 ort-
-facebook-enabled'%5D;%0A    %7D%0A%7D, %7B%0A    type: 'confirm',%0A    name: 'application:passport-twitter-enabled',%0A    message: 'Do you need Twitter authorization?',%0A    default: false
+enabled-strategies'%5D.indexOf('Facebook') %3E -1;%0A    %7D
 %0A%7D, 
@@ -1632,33 +1632,60 @@
 assport-
-twitter-enabled'%5D
+enabled-strategies'%5D.indexOf('Twitter') %3E -1
 ;%0A    %7D%0A
@@ -1910,174 +1910,59 @@
 ort-
-twitter-enabled'%5D;%0A    %7D%0A%7D, %7B%0A    type: 'confirm',%0A    name: 'application:passport-yahoo-enabled',%0A    message: 'Do you need Yahoo authorization?',%0A    default: false
+enabled-strategies'%5D.indexOf('Twitter') %3E -1;%0A    %7D
 %0A%7D, 
@@ -2164,39 +2164,66 @@
 on:passport-
-yahoo-
 enabled
-'%5D
+-strategies'%5D.indexOf('Yahoo') %3E -1
 ;%0A    %7D%0A%7D, %7B
@@ -2440,179 +2440,57 @@
 ort-
-yahoo-
 enabled
-'%5D;%0A    %7D%0A%7D, %7B%0A    type: 'confirm',%0A    name: 'application:passport-google-enabled',%0A    message: 'Do you need Google Plus authorization?',%0A    default: false
+-strategies'%5D.indexOf('Yahoo') %3E -1;%0A    %7D
 %0A%7D, 
@@ -2698,32 +2698,59 @@
 assport-
-google-enabled'%5D
+enabled-strategies'%5D.indexOf('Google') %3E -1
 ;%0A    %7D%0A
@@ -2973,24 +2973,51 @@
 ort-
-google-enabled'%5D
+enabled-strategies'%5D.indexOf('Google') %3E -1
 ;%0A  

Summarize questions about passport strategies